Closed micahgodbolt closed 2 months ago
This seems to be a combination of @fluentui/react-tabster + tabster problem:
Seems like no modal attribute is added once trapFocus
is false (which is the case for non-modal
dialogs)
It seems like even if the v9 code is modified to always include the modal attributes indicating no trap, some other issues appear
In this case, because the non-modal dialog trigger is inside arrow navigation area, it semantically belongs (via virtual parentship) to the arrow navigation area. And arrow navigation area (aka Mover) behaves almost correctly (minus the fact that arrow keys don't move focus to the inner part of the dialog). We'll discuss on a team sync what should the proper behaviour for these virtual parent cases be.
When a non-modal modal trigger is inside of an arrow navigation group, upon opening the modal, focus doesn't properly move to the modal.
regular modals don't exhibit the behavior, and moving the modal trigger outside of arrow navigation also negates the bug.
https://stackblitz.com/edit/5bb1gz-r6ndrd?file=src%2Fexample.tsx