-
Notifications
You must be signed in to change notification settings - Fork 3.4k
mdAutocomplete: Creates a lot of empty ul.md-autocomplete-suggestions tags #2624
Comments
+1 |
Possibly related to this is that autocomplete can pile up numerous duplicated entries in the They appear to get destroyed if you attempt to make an autocomplete entry which has no match, as this probably resets the collection $mdAutocompleteCtrl.messages, but I would expect that every time you type (or delete) a character into the autocomplete linked box it would clear that collection to only contain the most recent appropriate message. |
Followup: I might have duplicated something similar to what you are describing, at least in terms of When viewing that CodePen in Chrome, the autocomplete essentially works as I'd expect: Type or click in the box and it expands the list, click on an item and it selects that item into the input box. Although you have to click out to move the focus off and then click back in to pop open the list a second time, I'm okay with that for now and it works. In IE11, though, it's broken beyond measure. If you click within the box, the list appears, but clicking an item does an odd flash, redraws the list again farther to the left, and nothing is selected. If you double click the item, it appears to get selected as expected. I have debugged this in IE11 vs. Chrome as being an order mismatch on events being fired. In Chrome, the Furthermore, at random times (but happening often), even when the list appears to disappear, if I click in the empty whitespace below the input box, the list will open once again. It's as though the list is still there in the rendered page (albeit invisible) and accepting mouse events. The culprit seems to be the You can replicate this with the Material demo page for autocomplete in IE11 as well. Go to the "Basic Usage" demo, click once in the box to expand the list of states, and then click to the right in empty whitespace on the page. The list of options empties of all text, but the background frame that held the options expands in height to cover everything below it. See picture below: I feel like this is all related to the |
mdAutocomplete
doesn't remove child suggestions dropdown on$destroy
.And also this will fix problem when
autocomplete dropdown
keeps being visible afterautcomoplete
removed from DOM, (Can`t dublicate it in codepen, but this problem occures in my project)The text was updated successfully, but these errors were encountered: