.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" );
- this._on({
+ this._on( this.element, {
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
.zIndex( this.element.zIndex() + 1 )
.hide()
.data( "menu" );
+
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
// TODO remove dual storage
$.data( element, this.widgetName, this );
$.data( element, this.widgetFullName, this );
- this._on({
+ this._on( this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();