Search and Top Navigation
#6752 closed bug (fixed)
Opened December 15, 2010 04:58PM UTC
Closed December 18, 2010 07:40PM UTC
Last modified December 18, 2010 07:45PM UTC
Menu may still render when autocomplete is disabled
| Reported by: | draenor | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.8.8 |
| Component: | ui.autocomplete | Version: | 1.8.7 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
When the autocomplete plugin is disabled with outstanding ajax requests, the menu will still render when the request returns.
Proposed fix:
Add !this.options.disabled to if statement in _response.
E.g.,
_response: function( content ) {
if ( !this.options.disabled && content && content.length ) {
content = this._normalize( content );
this._suggest( content );
this._trigger( "open" );
} else {
this.close();
}
this.element.removeClass( "ui-autocomplete-loading" );
}
Attachments (0)
Change History (5)
Changed December 15, 2010 05:10PM UTC by comment:1
Changed December 17, 2010 04:12PM UTC by comment:2
| status: | new → open |
|---|
Changed December 18, 2010 07:40PM UTC by comment:3
| resolution: | → fixed |
|---|---|
| status: | open → closed |
Autocomplete: Abort pending ajax requests when disabled and prevent handling results when disabled. Fixes #6752 - Menu may still render when autocomplete is disabled.
Changeset: 0d0c86210c4a6473888089ddcea918df8c156022
Changed December 18, 2010 07:44PM UTC by comment:4
Autocomplete: Abort pending ajax requests when disabled and prevent handling results when disabled. Fixes #6752 - Menu may still render when autocomplete is disabled.
Changeset: d2a12ff825ebb0e620b25abdbcbaf024881ef537
Changed December 18, 2010 07:45PM UTC by comment:5
| milestone: | 1.9 → 1.8.8 |
|---|
When the autocomplete plugin is disabled with outstanding ajax requests, the menu will still render when the request returns.
Proposed fix:
Add !this.options.disabled to if statement in _response.
E.g.,
_response: function( content ) { if ( !this.options.disabled && content && content.length ) { content = this._normalize( content ); this._suggest( content ); this._trigger( "open" ); } else { this.close(); } this.element.removeClass( "ui-autocomplete-loading" ); }This flaw becomes very apparent when constructing completely ajax-driven pages where the autocomplete plugin may need to be forsibly closed every time e.g., a button is pressed.