New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tab skipping on multiselect field #2137
Fix tab skipping on multiselect field #2137
Conversation
It works like a charm! |
@bastianallgeier Actually, there was a conflict I was talking about. Don't you think that's a problem? |
What do you think should happen instead? Should the dropdown stay closed? Maybe @distantnative has more thoughts on this as the creator of the field. |
Here original field screencast: As you can see, when an item is selected with enter, you can continue from the same item. I think we should decide that:
|
Thinking some more about it, we should switch to space to open the dropdown. That's the same behaviour as for native select boxes and we avoid the conflict. What do you think? |
We have already
We have Let me work on whether the both can work together without conflict. |
@distantnative Can you handle this? |
Can we create an issue or something that I will remember to look at it on the weekend? I am afraid in this merged and closed PR I will forget it easily. |
Describe the PR
This issue occurred because the multiselect field did not contain an element that could be focused.
I've assigned the element
tabindex: 0*
on mounted and the enter key to open it when focused.Since I assigned the enter key to open it, it conflict (refocusing) with the enter key when selecting an item (MultiselectInput.vue). I've found the source and solution of the issue, but I'm waiting for your reviews about this conflict. We can either change the key to open it while focus or remove the enter key when selecting an item 馃
Tested on 3.2.4 and 3.2.5
Only suggestion as draft PR. If it is an insufficient solution, we can close it.
Reference solution: shentao/vue-multiselect#401
*means that the element should be focusable in sequential keyboard navigation, but its order is defined by the document's source order.
Related issues
Ready?
composer fix