Search and Top Navigation
#5895 closed bug (patcheswelcome)
Opened August 02, 2010 04:33PM UTC
Closed December 23, 2012 11:25PM UTC
Button: Using .button() from inside an onchange handler prevents the button click in WebKit
Reported by: | swalke16 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.11.0 |
Component: | ui.button | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a basic form containing a button element that is styled with the .button() method, and a single textbox.
The button has a click event handler set on it to perform some action, in this case just an alert message.
The change event of the textbox is bound to a handler that uses the .button("option", "label", "value") method to change the text on the button.
If I change the value in the textbox and leave the field by clicking the button, the button text changes, but the click event of the button is never fired.
This behavior is only reproducible in google chrome. Firefox and IE work just fine.
Test case:
Attachments (0)
Change History (9)
Changed July 12, 2011 12:39AM UTC by comment:1
Changed February 27, 2012 01:48PM UTC by comment:2
status: | new → open |
---|
Still reproducible in current Chrome.
Changed October 11, 2012 09:04PM UTC by comment:3
milestone: | TBD → 1.11.0 |
---|
Changed December 20, 2012 01:39PM UTC by comment:4
keywords: | ui.button, onchange |
---|---|
summary: | Using the .button() function from inside an onchange handler prevents the button click in Google Chrome → Button: Using .button() from inside an onchange handler prevents the button click in WebKit |
Updated minified test case against master - http://jsfiddle.net/tj_vantoll/NkSnH/. The alert fires in IE10, Firefox, and Opera. It does not fire in the latest Chrome nor Safari.
Changed December 21, 2012 03:01PM UTC by comment:5
This is a WebKit bug - http://jsfiddle.net/tj_vantoll/sNa3R/. I'll get around to filing a bug later tonight.
Changed December 23, 2012 09:55PM UTC by comment:6
resolution: | → wontfix |
---|---|
status: | open → closed |
Here's the WebKit bug - https://bugs.webkit.org/show_bug.cgi?id=105697. I'm going to close this as "wontfix" because I don't believe this is worth the hassle of trying to workaround the WebKit bug.
Changed December 23, 2012 09:57PM UTC by comment:7
If someone can come up with a reasonable way of working around this issue feel free to send a pull request.
Changed December 23, 2012 11:25PM UTC by comment:8
resolution: | wontfix |
---|---|
status: | closed → reopened |
Changed December 23, 2012 11:25PM UTC by comment:9
resolution: | → patcheswelcome |
---|---|
status: | reopened → closed |
Verified in "0245b72af87d3022f5dd780d03ff03d4751eca64" commit from github.
I've testing against A tags and submit inputs and submit inputs are working correctly but not links.
Also tested this in Safari 5 and it is in fact failing as well.
Doing the following does trigger the alert: