Skip to content

Commit

Permalink
Spinner: Don't stop propagation for keydown events.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Aug 6, 2011
1 parent 6981cab commit c4bd14f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ui/jquery.ui.spinner.js
Expand Up @@ -66,9 +66,8 @@ $.widget( "ui.spinner", {
this.element.attr( "role", "spinbutton" ); this.element.attr( "role", "spinbutton" );
this._bind({ this._bind({
keydown: function( event ) { keydown: function( event ) {
if ( this._start( event ) ) { if ( this._start( event ) && this._keydown( event ) ) {
// TODO: don't stop propagation event.preventDefault();
return this._keydown( event );
} }
}, },
keyup: function( event ) { keyup: function( event ) {
Expand Down Expand Up @@ -144,21 +143,21 @@ $.widget( "ui.spinner", {
switch ( event.keyCode ) { switch ( event.keyCode ) {
case keyCode.UP: case keyCode.UP:
this._repeat( null, 1, event ); this._repeat( null, 1, event );
return false; return true;
case keyCode.DOWN: case keyCode.DOWN:
this._repeat( null, -1, event ); this._repeat( null, -1, event );
return false; return true;
case keyCode.PAGE_UP: case keyCode.PAGE_UP:
this._repeat( null, options.page, event ); this._repeat( null, options.page, event );
return false; return true;
case keyCode.PAGE_DOWN: case keyCode.PAGE_DOWN:
this._repeat( null, -options.page, event ); this._repeat( null, -options.page, event );
return false; return true;
case keyCode.ENTER: case keyCode.ENTER:
this.value( this.element.val() ); this.value( this.element.val() );
} }


return true; return false;
}, },


_mousewheel: function() { _mousewheel: function() {
Expand Down

0 comments on commit c4bd14f

Please sign in to comment.