Search and Top Navigation
#15205 closed bug (duplicate)
Opened June 14, 2017 02:35PM UTC
Closed June 14, 2017 02:40PM UTC
Autocomplete menu bindings not cleared
| Reported by: | prestonm-pughs | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | none |
| Component: | ui.autocomplete | Version: | 1.12.1 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
When updating from 1.11.2 to 1.12.1 we noticed our autocomplete getting slower and slower the more we used it without refreshing the page.
I've traced this to the _suggest function in autocomplete where the DOM is emptied but the bindings are not resulting in thousands of references to DOM elements that do not exist.
_suggest: function( items ) {
var ul = this.menu.element.empty();
this._renderMenu( ul, items );
I added a line to reset the bindings:
_suggest: function( items ) {
var ul = this.menu.element.empty();
this.menu.bindings = $();
this._renderMenu( ul, items );
I think a more complete solution would be to add a function in the Menu widget to clear both the DOM and bindings.
Attachments (0)
Change History (1)
Changed June 14, 2017 02:40PM UTC by comment:1
| resolution: | → duplicate |
|---|---|
| status: | new → closed |
Duplicate of #15095.