chrome autocomplete and form validation

3,586 views
Skip to first unread message

pedro.t...@gmail.com

unread,
Dec 12, 2012, 6:13:50 AM12/12/12
to ang...@googlegroups.com
I know this probably isn't angular's fault, but here it goes:

Chrome autocomplete doesn't seam to be triggering the proper change events that allow angular to reflect the the value into the form, making the following not work properly:

....
<input ng-model="credentials.email" type="email" id="email" placeholder="Email" name="email" required>
<button type="submit" class="btn" ng-click="create()" ng-disabled="form.$invalid || submitting">Log in</button>
...

This makes the log in button disabled when chrome autocompletes it. And because the email field is required, the button is disabled in this case.

To circumvent this I have to disable chrome autocomplete by placing the attribute autocomplete="off" in fields, which doesn't allow the users to take advantage of the autocomplete service, which may have been very useful, specially in login forms like this example I gave.

Is there any known and sound workaround?

Thanks!

Peter Bacon Darwin

unread,
Dec 12, 2012, 6:57:11 AM12/12/12
to ang...@googlegroups.com
There is an open issue surrounding this problem...


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
 
 

Reply all
Reply to author
Forward
0 new messages