Skip to main content

Bug Tracker

Side navigation

#6319 closed bug (fixed)

Opened March 19, 2010 12:31PM UTC

Closed September 19, 2011 07:43PM UTC

Last modified March 08, 2012 07:25PM UTC

Regression: stopPropagation inside change handlers in IE is incorrectly applied to keydown event

Reported by: mikecapp Owned by: dmethvin
Priority: high Milestone: 1.7
Component: event Version: 1.4.3
Keywords: change keydown IE Cc:
Blocked by: Blocking:
Description

On switching from 1.3.2 to 1.4.2, some of our document-level ENTER keydown handlers stopped working when triggered from a just-modified textbox.

STEPS TO REPRODUCE:

1. Load attached reduction

2. Click on page background, then in textbox

3. Type something

4. Press ENTER

5. Press ENTER again

EXPECTED RESULTS:

The green ENTER indicator bar should flash for each press

ACYUAL RESULTS:

The green ENTER bar does NOT flash for the first press, although the red CHANGE bar does. The green bar DOES flash for the second press.

FURTHER DETAILS:

The reduction binds a handler to the change event on the input, which calls stopPropagation().

Reduction tested on Win2003/IE7; also reported on XP/IE6.

Not reproducible on non-IE browsers.

Reproducible with current nightly.

HYPOTHESIS: (a.k.a. "wild speculation")

1.3.2/IE didn't raise a change event on Enter; this could be a problem since the Enter will often be triggering form submission.

1.4.2 fixes this by detecting Enter keydowns and raising the change manually.

However, it's not cloning (or dummying up) the event object passed to the change handler, so that stopPropagation() on the change event is also stopping propagation of the keydown event.

Attachments (2)
Change History (13)

Changed March 31, 2010 03:56PM UTC by jtmoree@kahalacorp.c comment:1

I am having almost the same issue. All other browsers work fine. IE7 does not work.

In my case I have to change the text field twice for the onchange event to fire. Does not matter if it is focussed with the mouse or keyboard. I am using tab to move between fields. The enter key can be used to active the onchange in other browsers but not in IE 7.

Changed March 31, 2010 04:15PM UTC by jtmoree@kahalacorp.c comment:2

Switched from 1.4.1 to 1.4.2 and the problem still existed for a while then went away. Now I cannot recreate. was probably a caching issue. Sorry.

Changed October 02, 2010 06:00PM UTC by snover comment:3

priority: → undecided

Changed October 02, 2010 06:03PM UTC by snover comment:4

summary: Regression: change fixup interfering with keydown in IERegression: stopPropagation inside change handlers in IE is incorrectly applied to keydown event

Changed October 18, 2010 12:13AM UTC by snover comment:5

milestone: 1.4.31.4.4
priority: undecidedhigh
status: newopen
version: 1.4.21.4.3

Changed October 18, 2010 12:13AM UTC by snover comment:6

milestone: 1.4.41.5

Changed January 06, 2011 12:44AM UTC by dmethvin comment:7

owner: → dmethvin
status: openassigned

Changed April 07, 2011 12:45PM UTC by dmethvin comment:8

resolution: → fixed
status: assignedclosed

Fixed in 1.5.1.

Changed April 07, 2011 12:46PM UTC by dmethvin comment:9

resolution: fixed
status: closedreopened

Whoops, no it wasn't, I misinterpreted the test case.

Changed April 07, 2011 08:23PM UTC by timmywil comment:10

status: reopenedopen

Changed April 17, 2011 06:56PM UTC by john comment:11

milestone: → 1.next

Changed September 08, 2011 04:58PM UTC by dmethvin comment:12

milestone: 1.next1.7

This seems to be fixed in my 1.7 branch; I'll retest once it lands in master.

Changed September 19, 2011 07:43PM UTC by Dave Methvin comment:13

resolution: → fixed
status: openclosed

Rewrite IE special change/submit to make it faster/shorter. Fixes #6319.

Changeset: df6e0d508efd3aa2e242e61d810d22d3491e221c