Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was 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

Description

@zollinger

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions