#7261 closed bug (fixed)
Refresh scope in formResetHandler unintentionally wide
Reported by: | jgarber | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.8.14 |
Component: | ui.button | Version: | 1.8.9 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When I reset a form that has UI buttons, the reset.button
event is called, which is the function formResetHandler. It will refresh everything matching this selector:
$( ":ui-button", event.target.form )
For me on Firefox 4.0 and Safari 5.0.4, event.target
is the form that is being reset and
event.target.form
is undefined. Therefore, the scope is not limited and it finds all the ui-buttons on the page.
It causes problems for me because I'm using the jQuery-File-Upload plugin and I'm actually calling .button()
on a form because with that plugin, the form acts as a button. Something in the refresh jams the uploader, so when I reset a different form on the page, the uploader stops working. That's irrelevant, though.... My point is that it appears you only want to refresh the buttons of the form that's being reset, but it's actually refreshing all ui-buttons on the page.
See http://jsfiddle.net/jgarber/pJzGb/
Apologies in advance if I'm not understanding the intention of that code properly.
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in e0fafbb73526f60fdeab3f75532d6a4059d0d82a.
comment:3 Changed 12 years ago by
Milestone: | 1.9 → 1.8.14 |
---|
Merged into 1-8-stable in c45dd91f1b25a9edb8e168acf58e7224c46e0182.
https://github.com/jquery/jquery-ui/pull/228