Giter Site home page Giter Site logo

Comments (5)

skynet2 avatar skynet2 commented on May 17, 2024 1

Hi @robert-king ,

Please try this solution

<input ... autocomplete="off">

Ref https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Thanks,
Stas

from ngx-google-places-autocomplete.

sterichards avatar sterichards commented on May 17, 2024 1

@skynet2 It doesn't matter what value we set autocomplete to in the HTML template

The ngx-google-places-autocomplete directive overrides it and sets autocomplete="off" which is not good because of the Chrome bug which ignores autocomplete="off"

We need to be able to force autocomplete to a value of the developers choice

from ngx-google-places-autocomplete.

robert-king avatar robert-king commented on May 17, 2024

@skynet2 thanks but that doesn't work for chrome autofill. (I already have autocomplete="off").

See stackoverflow

Here is a fix someone made for angularJS:

(function(){
  'use strict'; 
  angular.module('app.directive')
    .directive('stopAutofill', stopAutofillDirective);

  function stopAutofillDirective() {
      return {
        restrict: 'A',
        link: function (scope, element) {
            var observerHack = new MutationObserver(function () {
                observerHack.disconnect();
                element.attr("autocomplete", "new-password");
            });

            observerHack.observe(element[0], {
                attributes: true,
                attributeFilter: ['autocomplete']
            });
        }
      };
    };
})();

from ngx-google-places-autocomplete.

skynet2 avatar skynet2 commented on May 17, 2024

hello @robert-king ,

Did you try this solution ? https://stackoverflow.com/a/50907563

Thanks,
Stas

from ngx-google-places-autocomplete.

saicharanbollampally avatar saicharanbollampally commented on May 17, 2024

Hi @skynet2 and @robert-king ,

I am facing same issue, let me know if you found any solution.

I tried above links but didn't work.

from ngx-google-places-autocomplete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.