aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-06 12:49:11 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-06 12:49:11 -0400
commitc4bd14f1bb66f48eccbd4c491ae76873729ab899 (patch)
treeb1df98c8f444a0bc04e1caed271552dabce0ead1 /ui/jquery.ui.spinner.js
parent6981cab9c40a7b93d6757c1770df2ca51e79d69d (diff)
downloadjquery-ui-c4bd14f1bb66f48eccbd4c491ae76873729ab899.tar.gz
jquery-ui-c4bd14f1bb66f48eccbd4c491ae76873729ab899.zip
Spinner: Don't stop propagation for keydown events.
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index 20c8d5e3d..47fb3e6f7 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -66,9 +66,8 @@ $.widget( "ui.spinner", {
this.element.attr( "role", "spinbutton" );
this._bind({
keydown: function( event ) {
- if ( this._start( event ) ) {
- // TODO: don't stop propagation
- return this._keydown( event );
+ if ( this._start( event ) && this._keydown( event ) ) {
+ event.preventDefault();
}
},
keyup: function( event ) {
@@ -144,21 +143,21 @@ $.widget( "ui.spinner", {
switch ( event.keyCode ) {
case keyCode.UP:
this._repeat( null, 1, event );
- return false;
+ return true;
case keyCode.DOWN:
this._repeat( null, -1, event );
- return false;
+ return true;
case keyCode.PAGE_UP:
this._repeat( null, options.page, event );
- return false;
+ return true;
case keyCode.PAGE_DOWN:
this._repeat( null, -options.page, event );
- return false;
+ return true;
case keyCode.ENTER:
this.value( this.element.val() );
}
- return true;
+ return false;
},
_mousewheel: function() {