#7444 closed bug (fixed)
Submitting form with "Enter" instead of button click on ie8 or ie7 triggers live submit event twice.
Reported by: | Owned by: | dmethvin | |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | event | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Run the following using ie8 and you will see the event triggered twice. Run it in any other browser and it is triggered only once.
Change History (13)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
I can confirm that this is not the case for a normal submit handler and that it also persists in the GIT 0 version of jQuery.
comment:3 Changed 13 years ago by
Component: | unfiled → event |
---|---|
Milestone: | 1.5 → 1.4.5 |
Priority: | undecided → high |
Status: | new → open |
Not a regression.
comment:4 Changed 12 years ago by
That's because of a tricky IE behavior.
When a user submits by pressing enter and the form has more than one text/password input field *and* there is a visible image/submit then IE generates onclick on the submit.
Hence, the special.submit catches both click and keypress.
The patch skips keydown if it knows that IE will throw click. Fixes the issue in IE 6,7,8.
comment:7 Changed 12 years ago by
comment:8 Changed 12 years ago by
I have experienced the same problems. This happens because the browser (not only IE, i have tested IE 6-8, Firefox 3.6.8, Opera 11.01, Chrome 10, Safari 5.0.4), when user press key "Enter" in text/password input field, then the browser after keydown/keypress/keyup events send "click" event to the first submit/image button. That's why handler is called twice.
comment:10 Changed 12 years ago by
Is this ever going to be fixed on new releases, or are you waiting for ie to die? My workaround no longer works with the latest jQuery.
comment:11 Changed 12 years ago by
I run into the same bug. I'm using the latest version of jQuery (1.6.4) and testing with IE7 and IE8. iliakan's description of the problem is what I see too.
Please help!
comment:12 Changed 12 years ago by
Milestone: | 1.next → 1.7 |
---|---|
Owner: | set to dmethvin |
Status: | open → assigned |
comment:13 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
IE 6 is also affected