Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Bug: _ensureHighlightVisible throws [ui.select:choices] Expected multiple .ui-select-choices-row but got '0'. #2050

Closed
zollinger opened this issue Aug 31, 2017 · 0 comments · Fixed by #2051

Comments

@zollinger
Copy link
Contributor

Bug description:

As _ensureHighlighVisible() is being called in a setTimeout() might be triggered in situations where the ui-select is actually closed and thus, the options aren't rendered. This clashes with the assertion of "choices.length > 1" made in _ensureHighlightVisible. It happens frequently on slower machines when double clicking the input field.

This is the same bug that was observed in #1355 (which was not a duplicate of #224, as the error thrown is quite different).

Link to minimally-working plunker that reproduces the issue:

To reproduce:

  1. Open plunkr below
  2. Enable Chrome performance throttling and set it to 10 - 20x slower
  3. Double click the ui-select element

http://plnkr.co/edit/ShmVlq3Xk7QVHurt6BLU?p=preview

Version of Angular, UI-Select, and Bootstrap/Select2/Selectize CSS

Angular: latest

UI-Select: latest

Bootstrap/Select2/Selectize CSS (if applicable): Bootstrap

zollinger pushed a commit to zollinger/ui-select that referenced this issue Aug 31, 2017
This fix ensures that the dropdown actually is open before calling
_ensureHighlightVisible.

Fixes: angular-ui#2050
asiacomeau pushed a commit to Mixpo/ui-select that referenced this issue Jan 4, 2018
This fix ensures that the dropdown actually is open before calling
_ensureHighlightVisible.

Fixes: angular-ui#2050
asiacomeau pushed a commit to Mixpo/ui-select that referenced this issue Jan 4, 2018
This fix ensures that the dropdown actually is open before calling
_ensureHighlightVisible.

Fixes: angular-ui#2050
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant