diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-05-18 10:32:59 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-18 10:32:59 -0400 |
commit | e0fafbb73526f60fdeab3f75532d6a4059d0d82a (patch) | |
tree | c6cc50f8e370045dac44c67ea5b8013c2dabcc1a /ui/jquery.ui.button.js | |
parent | d1f86cb2ff4ebd9b68a0b1e01d58fc8a5d2e5135 (diff) | |
download | jquery-ui-e0fafbb73526f60fdeab3f75532d6a4059d0d82a.tar.gz jquery-ui-e0fafbb73526f60fdeab3f75532d6a4059d0d82a.zip |
Button: Refactored formResetHandler and fixed scope. Foxes #7261 - Refresh scope in formResetHandler unintentionally wide.
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index e5eedc3e5..a95dddc6c 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -17,13 +17,11 @@ var lastActive, startXPos, startYPos, clickDragged, baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", stateClasses = "ui-state-hover ui-state-active ", typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", - formResetHandler = function( event ) { - $( ":ui-button", event.target.form ).each(function() { - var inst = $( this ).data( "button" ); - setTimeout(function() { - inst.refresh(); - }, 1 ); - }); + formResetHandler = function() { + var buttons = $( this ).find( ":ui-button" ); + setTimeout(function() { + buttons.button( "refresh" ); + }, 1 ); }, radioGroup = function( radio ) { var name = radio.name, |