]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Pass along some more original events.
authorScott González <scott.gonzalez@gmail.com>
Mon, 11 Oct 2010 12:51:54 +0000 (08:51 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 11 Oct 2010 12:51:54 +0000 (08:51 -0400)
ui/jquery.ui.autocomplete.js

index 8b41a24dcaa4ecfc6edaa4068cefc7d2a6745441..f9607aef774f8be84e4007c20d6a9b7920a83ea3 100644 (file)
@@ -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;
                }