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

Up and down arrow keys not working on select2 theme (version 0.12.0) #1059

Closed
tolemac opened this issue Jul 3, 2015 · 7 comments · Fixed by #1717
Closed

Up and down arrow keys not working on select2 theme (version 0.12.0) #1059

tolemac opened this issue Jul 3, 2015 · 7 comments · Fixed by #1717
Milestone

Comments

@tolemac
Copy link

tolemac commented Jul 3, 2015

Can see this plunkr:
http://plnkr.co/edit/q8fNxmGb1hqi3SuGdmeU?p=preview

Arrow keys work fine in Bootstrap and selectize but not in select2.

@RyanDale
Copy link

RyanDale commented Jul 6, 2015

The bug is happening because the dropdown is not focused. If you first click the search box to focus it, then the up/down arrow keys will work. I tested locally, and this issue (also referenced in #1053) should be fixed by #1040.

@tolemac
Copy link
Author

tolemac commented Jul 6, 2015

Then if you are in a form with several fileds and you are using the keyboard to enter data and using TAB to jump between fields ... when you arrive to ui-select ... have you take the mouse, point and click in search text box? It seems uncomfortable ...

@RyanDale
Copy link

RyanDale commented Jul 6, 2015

I wasn't suggesting that you should have to focus the select before using the arrow keys, just that the issue stemmed from the input not being correctly focused. Once the pull request I mentioned is merged, the dropdown will be correctly focused and the up/down keys should work as expected.

@tolemac
Copy link
Author

tolemac commented Jul 6, 2015

Ops! sorry, I misunderstood ... :(
Thanks

@cbryer
Copy link

cbryer commented Jul 17, 2015

this happens when using search-enabled="false" attribute on the ui-select directive as well. in that case there is no search box to focus and up/down never works.

@dimirc dimirc added this to the 0.12.x milestone Jul 28, 2015
@dimirc
Copy link
Contributor

dimirc commented Jul 28, 2015

Should be fixed with #1040

@dimirc dimirc closed this as completed Jul 28, 2015
@cbryer
Copy link

cbryer commented Jul 29, 2015

unfortunately this is not fixed with #1040 because there is an ng-show="$select.searchEnabled" on the search input. when searchEnabled == false the input has a style of display:none and can not get focus and the keyboard keys stop working.

user378230 pushed a commit to user378230/ui-select that referenced this issue Jul 10, 2016
Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes angular-ui#1059
user378230 pushed a commit to user378230/ui-select that referenced this issue Jul 10, 2016
Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes angular-ui#1059, fixes angular-ui#917, fixes angular-ui#589, fixes angular-ui#375
Closes angular-ui#1543, closes angular-ui#1114, closes angular-ui#1109 (supersedes all)
aaronroberson pushed a commit that referenced this issue Aug 7, 2016
* fix(searchEnabled): maintain keyboard nagivation

Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes #1059, fixes #917, fixes #589, fixes #375
Closes #1543, closes #1114, closes #1109 (supersedes all)

* fix(selectize): show placeholder when search disabled

Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes #1145, fixes #949, fixes #691

* fix(searchEnabled): Prevent searching when disabled

Previously, even when search-enabled was set to false, users could
still type in text and filter the list. This made disabling the search
feature pointless.

This fix prevents text entry to the search input and thus disables
filtering.

Fixes #1658
kboga pushed a commit to kboga/ui-select that referenced this issue Nov 29, 2016
* fix(searchEnabled): maintain keyboard nagivation

Fix issue where keyboard navigation was disabled when searchEnabled
was set to false.

Caused by hiding the input box which prevent key events from
propagating to the directive.

Resolved hiding the input offscreen when searchEnabled is false.

Fixes angular-ui#1059, fixes angular-ui#917, fixes angular-ui#589, fixes angular-ui#375
Closes angular-ui#1543, closes angular-ui#1114, closes angular-ui#1109 (supersedes all)

* fix(selectize): show placeholder when search disabled

Previously when searchEnabled was set to false, the placeholder would
also be hidden on the selectize theme.

This fix sets the search input to disabled rather then hidden when the
searchEnabled attribute is set to false.

Fixes angular-ui#1145, fixes angular-ui#949, fixes angular-ui#691

* fix(searchEnabled): Prevent searching when disabled

Previously, even when search-enabled was set to false, users could
still type in text and filter the list. This made disabling the search
feature pointless.

This fix prevents text entry to the search input and thus disables
filtering.

Fixes angular-ui#1658
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.

4 participants