问题
I'm creating a slide in menu -w hen not on display the panel is hidden off canvas. However, I've noticed that when using the TAB key, elements not visible at the time get focus bringing the off-canvas panel into view.
Any ideas as to how to deal with this?
回答1:
If you are using html5 you can add tabindex='-1' to disable getting focus by tabs.
Of course if necessary you can always re-enable them when the panel is viewable.
来源:https://stackoverflow.com/questions/27963797/tabbing-to-off-canvas-elements