diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-20 21:52:31 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-03-20 21:52:31 +0100 |
commit | 64f6bfae3a37cae9cc1ddcb77866669021202cb6 (patch) | |
tree | d270f78ea70bc04efd5934aa3b52e375cdc6b345 | |
parent | d4ad2cb837565b16f7a11558a0f94c8c799d8522 (diff) | |
parent | 0e2484950b5df8d99f949a73c9c3fe4d42e97b8b (diff) | |
download | jquery-ui-64f6bfae3a37cae9cc1ddcb77866669021202cb6.tar.gz jquery-ui-64f6bfae3a37cae9cc1ddcb77866669021202cb6.zip |
Merge branch 'master' of github.com:jquery/jquery-ui
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 021b330a6..fab7a6287 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -60,7 +60,7 @@ $.widget( "ui.autocomplete", { if ( !self.menu.active ) { return; } - self.menu.select(); + self.menu.select( event ); break; case keyCode.ESCAPE: self.element.val( self.term ); @@ -334,13 +334,13 @@ $.widget("ui.menu", { role: "listbox", "aria-activedescendant": "ui-active-menuitem" }) - .click(function(e) { - if ( !$( e.target ).closest( ".ui-menu-item" ).length ) { + .click(function( event ) { + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { return; } // temporary - e.preventDefault(); - self.select(); + event.preventDefault(); + self.select( event ); }); this.refresh(); }, @@ -481,8 +481,8 @@ $.widget("ui.menu", { return this.element.height() < this.element.attr("scrollHeight"); }, - select: function() { - this._trigger("selected", null, { item: this.active }); + select: function( event ) { + this._trigger("selected", event, { item: this.active }); } }); |