aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-05-18 10:32:59 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-18 10:33:37 -0400
commitc45dd91f1b25a9edb8e168acf58e7224c46e0182 (patch)
tree0ed16ff275c57bdb5e8c2143665b0e9f43a34530
parent31248645418a1288c12c61c4d85d8c698b3bd305 (diff)
downloadjquery-ui-c45dd91f1b25a9edb8e168acf58e7224c46e0182.tar.gz
jquery-ui-c45dd91f1b25a9edb8e168acf58e7224c46e0182.zip
Button: Refactored formResetHandler and fixed scope. Foxes #7261 - Refresh scope in formResetHandler unintentionally wide.
(cherry picked from commit e0fafbb73526f60fdeab3f75532d6a4059d0d82a)
-rw-r--r--ui/jquery.ui.button.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 2539846f6..1bc016edd 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,