mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: Switch to span to avoid cranky click/keydown event handling
This commit is contained in:
parent
6e80a19d02
commit
022079a782
5
ui/jquery.ui.selectmenu.js
vendored
5
ui/jquery.ui.selectmenu.js
vendored
@ -68,7 +68,7 @@ $.widget( "ui.selectmenu", {
|
|||||||
this.element.hide();
|
this.element.hide();
|
||||||
|
|
||||||
// create button
|
// create button
|
||||||
this.button = $( "<button>", {
|
this.button = $( "<span>", {
|
||||||
"class": "ui-button ui-widget ui-state-default ui-corner-all",
|
"class": "ui-button ui-widget ui-state-default ui-corner-all",
|
||||||
tabindex: ( tabindex ? tabindex : this.options.disabled ? -1 : 0 ),
|
tabindex: ( tabindex ? tabindex : this.options.disabled ? -1 : 0 ),
|
||||||
id: this.ids.button,
|
id: this.ids.button,
|
||||||
@ -332,8 +332,9 @@ $.widget( "ui.selectmenu", {
|
|||||||
case $.ui.keyCode.SPACE:
|
case $.ui.keyCode.SPACE:
|
||||||
if ( this.isOpen ) {
|
if ( this.isOpen ) {
|
||||||
this.menu.menu( "select", event );
|
this.menu.menu( "select", event );
|
||||||
|
} else {
|
||||||
|
this._toggle( event );
|
||||||
}
|
}
|
||||||
prevDef = false;
|
|
||||||
break;
|
break;
|
||||||
case $.ui.keyCode.LEFT:
|
case $.ui.keyCode.LEFT:
|
||||||
this._move( "previous", event );
|
this._move( "previous", event );
|
||||||
|
Loading…
Reference in New Issue
Block a user