We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb5cad3 commit 64cdaa8Copy full SHA for 64cdaa8
ui/jquery.ui.spinner.js
@@ -62,9 +62,7 @@ $.widget( "ui.spinner", {
62
.wrap( this._uiSpinnerHtml() )
63
.parent()
64
// add buttons
65
- .append( this._buttonHtml() )
66
- // add behaviors
67
- .disableSelection();
+ .append( this._buttonHtml() );
68
this._hoverable( uiSpinner );
69
70
this.element.attr( "role", "spinbutton" );
@@ -108,6 +106,12 @@ $.widget( "ui.spinner", {
108
106
.removeClass( "ui-corner-all" );
109
107
this._bind( this.buttons, {
110
mousedown: function( event ) {
+ // ensure focus is on (or stays on) the text field
+ event.preventDefault();
111
+ if ( document.activeElement !== this.element[ 0 ] ) {
112
+ this.element.focus();
113
+ }
114
+
115
if ( this._start( event ) === false ) {
116
return;
117
}
0 commit comments