if ( !self.menu.active ) {
return;
}
- self.menu.select();
+ self.menu.select( event );
break;
case keyCode.ESCAPE:
self.element.val( self.term );
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();
},
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 });
}
});