Skip to main content

Search and Top Navigation

#7276 closed bug (notabug)

Opened April 22, 2011 12:30AM UTC

Closed April 24, 2011 11:49PM UTC

ui not being passed to autocomplete.open

Reported by: jostster Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.autocomplete Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

There is a similar bug that was closed for this as "worksforme" however I do not see it working as intended.

http://jsfiddle.net/UMGsJ/

the open ui variable should include the items that are being displayed in the ui-menu and not just the prototype object. For example if you click on an entry you will see the prototype object and the item logged to console from the 'display' page on the jsfiddle site. When the ui-menu open's only the prototype is displayed and not the items.

Attachments (0)
Change History (2)

Changed April 22, 2011 12:34AM UTC by jostster comment:1

_response: function( content ) {
		if ( !this.options.disabled && content && content.length ) {
			content = this._normalize( content );
			this._suggest( content );
			this._trigger( "open" );
		} else {
			this.close();
		}
		this.pending--;
		if ( !this.pending ) {
			this.element.removeClass( "ui-autocomplete-loading" );
		}
	},

should probably be

_response: function( content ) {
		if ( !this.options.disabled && content && content.length ) {
			content = this._normalize( content );
			this._suggest( content );
			this._trigger( "open", content );
		} else {
			this.close();
		}
		this.pending--;
		if ( !this.pending ) {
			this.element.removeClass( "ui-autocomplete-loading" );
		}
	},

To somewhat match the select which is _triggering the event and the selected item.

Changed April 24, 2011 11:49PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

The open event isn't supposed to contain any information. What you want is the response event which is being added in 1.9 (see #6777).