-
Notifications
You must be signed in to change notification settings - Fork 1.8k
when searchEnabled is false shortcuts in list do not work #331
Comments
I also have this issue with ui-select. Without a search box focus is lost, you can tab and eventually focus on the drop down which allows keyboard controls, this focusing should happen immediately when the drop down opens. |
I see the problem is that focus and keyboard events are handled through a the search element, which is hidden in this case. This code is the culprit:
(Line 106 in version 0.9.3) To fix, need to attach listeners to a different element. |
This change ensures that the search boxes are not hidden when in !searchEnabled and they are clicked. This ensures that they can still receive focus and react to keyboard events. This addresses issue angular-ui#331.
+1 |
1 similar comment
+1 |
This solution is kind of a hack. I'm not a big fan of it myself. |
@aeisenberg The only alternatives I can think of are:
What do you think? |
I seem to remember that there were some edge cases that didn't work properly, but I can't remember what they were. Honestly, I created the fix 6 months ago and don't remember everything. I don't think your suggestion 1 will work since I think that the events need to be attached to the search box, which is the element that gets focus. For the same reason suggestion 2 won't work. The truth is that I am torn about this fix. It is not great, but I can't think of a better way. If the fix does work properly, then it's probably good enough, but I'm not confident that it does in all cases. |
@aeisenberg Thanks for you input. Regarding - 1) - I mean moving the input to a different z-index after the focus. Do you still think number 1 won't work? |
Hmmm...#1 might work. If you want to take a crack at it, I'll be happy to On Mon, Jun 15, 2015 at 9:52 AM, Sagiv Frankel notifications@github.com
|
Perhaps there should to be a container element with |
Can you post a more up to date Plunker based on the latest release? |
@aaronroberson or @user378230 , looks like it is fixed as I cannot reproduce it any more with the latest. |
Closed by #1717 |
see http://plnkr.co/edit/fC6Cz0Foy55JvkUvwoDp?p=preview
I cannot use enter,up/down arrows when list is open; if searchEnabled is true shortcuts work
The text was updated successfully, but these errors were encountered: