.wrap( this._uiSpinnerHtml() )
.parent()
// add buttons
- .append( this._buttonHtml() )
- // add behaviors
- .disableSelection();
+ .append( this._buttonHtml() );
this._hoverable( uiSpinner );
this.element.attr( "role", "spinbutton" );
.removeClass( "ui-corner-all" );
this._bind( this.buttons, {
mousedown: function( event ) {
+ // ensure focus is on (or stays on) the text field
+ event.preventDefault();
+ if ( document.activeElement !== this.element[ 0 ] ) {
+ this.element.focus();
+ }
+
if ( this._start( event ) === false ) {
return;
}