aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-06 13:27:42 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-06 13:27:42 -0400
commit4d2ac1abca64ec19407f4a8217388223aea9cca4 (patch)
tree6e20ad2ba785666c70954e824d459fccfcb5b33d
parentc1da941f9f664e3dabe1d0b0da8a04dc4d073cf5 (diff)
downloadjquery-ui-4d2ac1abca64ec19407f4a8217388223aea9cca4.tar.gz
jquery-ui-4d2ac1abca64ec19407f4a8217388223aea9cca4.zip
Spinner: Don't stop propgation of mousedown. Added TODOs.
-rw-r--r--ui/jquery.ui.spinner.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index 1b55d8374..a8f3a4fe9 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -103,14 +103,15 @@ $.widget( "ui.spinner", {
this._bind( this.buttons, {
mousedown: function( event ) {
if ( this._start( event ) === false ) {
- // TODO: do we really want to stop propagation?
- return false;
+ return;
}
+
this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
},
mouseup: function( event ) {
if ( this.spinning ) {
this._stop( event );
+ // TODO: don't trigger change until the field is blurred
this._change( event );
}
},
@@ -125,7 +126,9 @@ $.widget( "ui.spinner", {
}
this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
},
- // TODO: we shouldn't trigger any events until mouseup
+ // 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() {
if ( this.spinning ) {
this._stop( event );
@@ -183,6 +186,7 @@ $.widget( "ui.spinner", {
this.timeout = setTimeout(function() {
if ( this.spinning ) {
this._stop( event );
+ // TODO: don't trigger change until the field is blurred
this._change( event );
}
}, 100 );