mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Merge branch 'master' of github.com:jquery/jquery-ui
This commit is contained in:
commit
64f6bfae3a
14
ui/jquery.ui.autocomplete.js
vendored
14
ui/jquery.ui.autocomplete.js
vendored
@ -60,7 +60,7 @@ $.widget( "ui.autocomplete", {
|
|||||||
if ( !self.menu.active ) {
|
if ( !self.menu.active ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.menu.select();
|
self.menu.select( event );
|
||||||
break;
|
break;
|
||||||
case keyCode.ESCAPE:
|
case keyCode.ESCAPE:
|
||||||
self.element.val( self.term );
|
self.element.val( self.term );
|
||||||
@ -334,13 +334,13 @@ $.widget("ui.menu", {
|
|||||||
role: "listbox",
|
role: "listbox",
|
||||||
"aria-activedescendant": "ui-active-menuitem"
|
"aria-activedescendant": "ui-active-menuitem"
|
||||||
})
|
})
|
||||||
.click(function(e) {
|
.click(function( event ) {
|
||||||
if ( !$( e.target ).closest( ".ui-menu-item" ).length ) {
|
if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// temporary
|
// temporary
|
||||||
e.preventDefault();
|
event.preventDefault();
|
||||||
self.select();
|
self.select( event );
|
||||||
});
|
});
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
@ -481,8 +481,8 @@ $.widget("ui.menu", {
|
|||||||
return this.element.height() < this.element.attr("scrollHeight");
|
return this.element.height() < this.element.attr("scrollHeight");
|
||||||
},
|
},
|
||||||
|
|
||||||
select: function() {
|
select: function( event ) {
|
||||||
this._trigger("selected", null, { item: this.active });
|
this._trigger("selected", event, { item: this.active });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user