vue-grid-layout
vue-grid-layout copied to clipboard
Keyboard navigation sequence with `tab` is lost after moving grid items
Software version (please complete the following information):
- Browser: chrome
- Vue Version: 2.6.14
- vue-grid-layout Version: 2.3.12
Describe the bug
Keyboard navigation with tab
is performed in the order in which the elements are passed to the layout object.
Go to CodeSandbox Template.
To Reproduce Steps to reproduce the behavior:
- Go to CodeSandbox Template
- Navigate with "tab" through the buttons
- See error
Expected behavior
Keyboard navigation with tab
must be performed in the order in which the element is displayed on the screen.
The attached example is using react-grid-layout
. Did you mean to post this in vue-grid-layout
?
Yes. Same issue in vue-grid-layout
Can you provide a more specific Expected Behaviour and the Actual Behaviour so I can understand what's wrong? Granted, I am not the developer, but what I see in the code sandbox looks expected already. Perhaps a more detailed description will help me understand your problem.

When I navigate with tab
I expect the focus sequence shown in green numbers, but I get the focus shown in red numbers
I've tested this in Chrome using Vue 2.6.14 and vue-grid-layout 2.3.12 and I cannot reproduce. It is very likely a browser issue since you are not specifying tab indexes in your code, but since I cannot reproduce I cannot try adding tabindices to the grid layouts and see if that helps.
Could you send me a link to the sandbox where you reproduce the problem?
I was unable to reproduce is the problem. Can you link a sandbox where you can reproduce this in vue-grid-layout and not react-grid-layout?
https://codesandbox.io/s/vue-grid-layout-cy5qb1
- move cards
- navigate with
tab
I still can't see the issue, even when comparing with Chrome in Windows vs Chrome on Mac. If you're experiencing the problem with both react and vue grid layout packages, then perhaps it's not a problem with either of these packages. Anyway, you can fix these by adding tabindexes
to each grid box.