Opened 13 years ago
Closed 10 years ago
#5895 closed bug (patcheswelcome)
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:
Change History (9)
comment:1 Changed 12 years ago by
comment:3 Changed 10 years ago by
Milestone: | TBD → 1.11.0 |
---|
comment:4 Changed 10 years ago by
Keywords: | ui.button onchange removed |
---|---|
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.
comment:5 Changed 10 years ago by
This is a WebKit bug - http://jsfiddle.net/tj_vantoll/sNa3R/. I'll get around to filing a bug later tonight.
comment:6 Changed 10 years ago by
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.
comment:7 Changed 10 years ago by
If someone can come up with a reasonable way of working around this issue feel free to send a pull request.
comment:8 Changed 10 years ago by
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
comment:9 Changed 10 years ago by
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: