Ticket #7261 (closed bug: fixed)
Refresh scope in formResetHandler unintentionally wide
|Reported by:||jgarber||Owned by:|
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.
Apologies in advance if I'm not understanding the intention of that code properly.