diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-08-06 15:26:12 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-08-06 15:26:12 -0400 |
commit | 08a7a11a1b02ca33cb27cdde7cef0491f3a5e641 (patch) | |
tree | 0cf89676b56dbfdece525e0ce1c64a69e11c8d78 | |
parent | 64cdaa82e6736c4b06f6a37ef790820b22d706ed (diff) | |
download | jquery-ui-08a7a11a1b02ca33cb27cdde7cef0491f3a5e641.tar.gz jquery-ui-08a7a11a1b02ca33cb27cdde7cef0491f3a5e641.zip |
Spinner: Don't set focus on stop, focus should already be correct. Always remove ui-state-active on blur, since we no longer blur when interacting with buttons.
-rw-r--r-- | ui/jquery.ui.spinner.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 2add2d60a..da140308e 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -89,13 +89,7 @@ $.widget( "ui.spinner", { if ( parsed === null ) { this.element.val( value ); } - // TODO: is this really correct or just the simplest - // way to keep the active class when pressing the buttons? - // if the mosue is over the text field and the user tabs out - // shouldn't the active class get removed? - if ( !uiSpinner.hasClass( "ui-state-hover" ) ) { - uiSpinner.removeClass( "ui-state-active" ); - } + uiSpinner.removeClass( "ui-state-active" ); } }); @@ -139,7 +133,7 @@ $.widget( "ui.spinner", { // TODO: do we really want to consider this a stop? // shouldn't we just stop the repeater and wait until mouseup before // we trigger the stop event? - mouseleave: function() { + mouseleave: function( event ) { if ( this.spinning ) { this._stop( event ); this._change( event ); @@ -284,7 +278,6 @@ $.widget( "ui.spinner", { _stop: function( event ) { clearTimeout( this.timer ); this.counter = 0; - this.element.focus(); this.spinning = false; this._trigger( "stop", event ); }, |