Skip to main content

Bug Tracker

Side navigation

#14289 closed bug (cantfix)

Opened August 23, 2013 02:45PM UTC

Closed August 23, 2013 04:20PM UTC

Altering button text in change handler prevents next click event in Chrome

Reported by: joed Owned by: joed
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: chrome blink Cc: mkwst
Blocked by: Blocking:
Description

In the change event handler for an input field, I change the text of a button. If the change event gets fired because I click on the button (i.e., enter text in the field and then immediately click the button), the click for the button is not fired. This is different from how it behaves using raw javascript, as shown in this jsfiddle:

http://jsfiddle.net/joed/AwdQa/3/

It works fine, both raw and jQuery, in Firefox 22 and IE 10, but not Chrome 28, on a PC. I have not tried any others.

Attachments (0)
Change History (5)

Changed August 23, 2013 03:51PM UTC by dmethvin comment:1

owner: → joed
status: newpending

Seems related to the alert() call but not a jQuery bug. Can you reduce the problem further? This works consistently for example: http://jsfiddle.net/AwdQa/10/

Changed August 23, 2013 03:55PM UTC by joed comment:2

status: pendingnew

It is the altering of the button that causes the problem. I updated your jsfiddle to change the button text instead of appending "changed ", and the problem comes back (again, only in Chrome).

http://jsfiddle.net/joed/AwdQa/11/

Changed August 23, 2013 04:08PM UTC by dmethvin comment:3

Oh duh, yeah, like the ticket says. :)

Seems like it can be reproed with basic DOM functions tho, does this break the same both ways?

http://jsfiddle.net/AwdQa/12/

Changed August 23, 2013 04:16PM UTC by joed comment:4

Excellent! You are correct - the change from 'innerHTML' to 'textContent' in the basic DOM code makes the difference. I'll report it to the Chrome folks.

Thanks! I don't see any way for me to mark this as closed, so I'll leave that to you.

Changed August 23, 2013 04:20PM UTC by dmethvin comment:5

cc: → mkwst
keywords: → chrome blink
resolution: → cantfix
status: newclosed

Great. I'll mark this cantfix, if you could put a link to the Chrome ticket here once you've filed it that would be helpful. Thanks!