Side navigation
#7444 closed bug (fixed)
Opened November 08, 2010 11:06PM UTC
Closed September 22, 2011 01:43AM UTC
Last modified March 08, 2012 10:46PM UTC
Submitting form with "Enter" instead of button click on ie8 or ie7 triggers live submit event twice.
Reported by: | paul@iversant.com | 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.
Attachments (0)
Change History (13)
Changed November 08, 2010 11:29PM UTC by comment:1
Changed November 08, 2010 11:35PM UTC by comment:2
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.
Changed November 09, 2010 01:15AM UTC by comment:3
component: | unfiled → event |
---|---|
milestone: | 1.5 → 1.4.5 |
priority: | undecided → high |
status: | new → open |
Not a regression.
Changed December 18, 2010 04:42PM UTC by comment:4
_comment0: | 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 ignores keydown if it knows that IE will throw click. Up to IE8. \ \ \ \ → 1292717309347334 |
---|---|
_comment1: | 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 ignores keydown if it knows that IE will throw click. Fixes the issue in all supported IE. \ \ \ \ → 1292717322872717 |
_comment2: | 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 ignores keydown if it knows that IE will throw click. Fixes the issue in IE 6,7,8. \ \ \ \ → 1292752821867053 |
_comment3: | 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 ignores keydown if it knows that IE will throw click. Fixes the issue in IE 6,7,8. \ \ https://github.com/jquery/jquery/pull/134 \ \ \ \ → 1292752883221732 |
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.
Changed December 18, 2010 05:07PM UTC by comment:5
_comment0: | https://github.com/jquery/jquery/pull/134 → 1292752833366515 |
---|
Changed March 04, 2011 01:22PM UTC by comment:7
Changed March 16, 2011 12:38PM UTC by comment:8
_comment0: | I have experienced the same problems. \ This happens because the browser (i tested IE 6-7, Firefox 3.6.8, Opera 11.01, Chrome), when user press key "Enter" in text or password field, then the browser after (keydown, keypress, keyup) events send "click" event to the first submit or image button. That's why handler is called twice → 1300279901600122 |
---|---|
_comment1: | I have experienced the same problems. \ This happens because the browser (not only IE, i have tested IE 6-7, Firefox 3.6.8, Opera 11.01, Chrome), when user press key "Enter" in text or password field, then the browser after (keydown, keypress, keyup) events send "click" event to the first submit or image button. That's why handler is called twice → 1300280419833393 |
_comment2: | 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. I guess that keypress.specialSubmit is unnecessary → 1305113587310946 |
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.
Changed May 16, 2011 04:53PM UTC by comment:9
If there are any alternatives for bypassing this problem?
Changed July 22, 2011 11:20PM UTC by comment:10
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.
Changed September 15, 2011 03:08PM UTC by comment:11
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!
Changed September 22, 2011 01:42AM UTC by comment:12
milestone: | 1.next → 1.7 |
---|---|
owner: | → dmethvin |
status: | open → assigned |
Changed September 22, 2011 01:43AM UTC by comment:13
resolution: | → fixed |
---|---|
status: | assigned → closed |
IE 6 is also affected