Issue on Chrome with tabindex="-1" container when there's a document selection
See original GitHub issueHi, I encounter a strange behavior on Chrome.
When I activate a focus trap on a radio group inside a container with tabindex="-1"
I can no longer click radio labels to toggle radios, but only when I select some text before activating the focus trap 🤷♂️
Here is a gif of the issue :
The code to reproduce : https://gist.github.com/romgere/daa6d4875ba613a4ed42f75d6bce73f6
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
tabindex - HTML: HyperText Markup Language | MDN
Click anywhere in this pane, then try tabbing through the elements. First in tab order: Tabbable due to tabindex. Not tabbable: no tabindex....
Read more >pressKey('tab') sometimes works wrong with tabIndex=-1
There is a dialog popup and container with tabIndex=-1 in it. There are some inputs in the container. What is the Current behavior?...
Read more >javascript - Why doesn't focus() select my container div?
When you set the tabindex=-1 for an element it allows it to get focus() through javascript. If instead you want it to get...
Read more >Using tabindex - web.dev
Press Tab to Focus Me! tabindex="-1" : Removes an element from the natural tab order, but the element can still be focused by...
Read more >HTML Roving tabindex Attribute Explained with Examples
You use the HTML tabindex attribute to set an element's tab position, and it usually indicates that an element can be tabbed with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@romgere FYI, I have a fix in https://github.com/focus-trap/focus-trap/pull/324
Thanks for the follow-up! I’m glad you got it working.
I’m going to close this issue. It can always be re-opened in the future if a lot of people start running into this.