mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete: Pass along some more original events.
This commit is contained in:
parent
03efae2887
commit
da13ea26fe
4
ui/jquery.ui.autocomplete.js
vendored
4
ui/jquery.ui.autocomplete.js
vendored
@ -157,7 +157,7 @@ $.widget( "ui.autocomplete", {
|
||||
.menu({
|
||||
focus: function( event, ui ) {
|
||||
var item = ui.item.data( "item.autocomplete" );
|
||||
if ( false !== self._trigger( "focus", null, { item: item } ) ) {
|
||||
if ( false !== self._trigger( "focus", event, { item: item } ) ) {
|
||||
// use value to match what will end up in the input, if it was a key event
|
||||
if ( /^key/.test(event.originalEvent.type) ) {
|
||||
self.element.val( item.value );
|
||||
@ -266,7 +266,7 @@ $.widget( "ui.autocomplete", {
|
||||
}
|
||||
|
||||
clearTimeout( this.closing );
|
||||
if ( this._trigger("search") === false ) {
|
||||
if ( this._trigger( "search", event ) === false ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user