Focus trapping in Firefox + <sl-select>
do not behave as expected
#1809
Labels
bug
Things that aren't working right in the library.
Describe the bug
Found a super fun Firefox only "bug" with our focus trapping utility +
<sl-select>
.When you go to tab into the buttons, you get stuck on the overflowing list, and then kicked out to the close button.
https://codepen.io/paramagicdev/pen/WNmxxQV
To Reproduce
1.) The currently focused element must be a
<sl-select>
2.) the next element must be an element with
overflow: auto / scroll
3.) you must be in firefox
4.) you must be inside of a
<sl-dialog>
or any other focus trapping containerDemo
https://codepen.io/paramagicdev/pen/WNmxxQV
Additional information
This happens because of a number of things:
Firefox has
overflow: auto / scroll
elements as scrollable. Our focus trapping utility doesn't account for that.<sl-select>
stops the focus trapping behavior of"Tab"
by calling.stopPropagation()
shoelace/src/components/select/select.component.ts
Line 412 in dd483c0
The text was updated successfully, but these errors were encountered: