Has anyone else run into the issue where handling a click event on a s开发者_运维问答ubmit button for a form with preventDefault stops autocomplete from working?
To be specific it simply never prompts to save the username and password combination, I assume this is because it is triggered on a post request which doesn't occur in my case.
Can anyone think of a workaround?
PS: I have only tested in IE but am willing to bet I will see similar issues in the other browsers (will test shortly).
You have three options when altering the flow of an event:
e.preventDefault()
e.stopPropagation()
return false
(calls both of the above).
Maybe trying using e.stopPropagation()
instead, and see what that does for you.
精彩评论