Skip to content

Dropdown not closing when you tab into field, type and hit enter #1172

@uiuxdeveloper

Description

@uiuxdeveloper

Not sure how to bug this, but here is the scenario I ran into:

  • initialize bootstrap-select with a container bound to the body
  • create a form with an input text field before the select dropdown
  • tab through the form and into the select field
  • start typing, which will open the dropdown and highlight the option
  • hit enter and tab out

• The result is that the select box does not close
• In some instances the dropup vs dropdown doesn't handle nicely

DEBUGGING REVEALED
• bootstrap toggle doesn't get properly called and set because the parent isn't properly. dropdown.js sets the class of the parent to open and aria-expanded to true. The toggle controller uses these to correctly determine the open/close state. When bootstrap-select builds the option list outside of the parent using container it has a problem finding the parent and the classes are not set. This of course leads to inconsistent behavior and breaks tabbing and keydown behavior.

Metadata

Metadata

Assignees

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