Google Groups

Re: [angular.js] Email validation not working with Chrome auto complete.

Kyle Finley Jun 26, 2012 8:58 AM
Posted in group: AngularJS
Vojta, thank you for looking into this.

I believe you are correct - Chrome is the issue here. 

When I first reported the problem I misdescribed it, I believe that's why it's difficult to reproduce. I've updated the Github issue with more information. Essentially the problem is Chrome's Autofill behavior not the tab complete. It is apparent that Chrome is using Autofill and not tab complete when the background color changes to yellow. For a user to be affected they must have saved Autofill information, therefore, the number of people affected will be smaller then I initially thought.

Currently there are two workarounds:

1. Remove method="POST" from the form - this will disable Autofill
2. Manually fire the input event: $('#myform input,#myform select').on(function() { $(this).trigger('input'); }); as described by @robrbecker on Github

Angular's documentation does not include the method="POST" attribute in the form. As long as developers follow that example their users will not be affected by this.

Thank you

- Kyle