Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Products/sites affected: Visual Studio Team Services / Team Foundation Server
When I have a FocusZone (as the last element group) inside a FocusTrapZone, on tabbing out from the FocusZone, the focus goes outside the FocusTrapZone. The TrapZone checks if the current element is the last focusable one inside it and if it is, it moves the focus to the first element. However, since in case of FocusZones, tab press on any of the elements inside it would take the focus outside it, when the last group of elements is inside a FocusZone, the focus is gone
As mentioned, focus leaves the FocusTrapZone, once we press tab on an element, which is not the last one, indise the FocusZone, which is the last element in the FocusTrapZone
Note that the only case in which the behaviour is correct is when my focus is on the last element inside the FocusZone, when I tab. In this case the computed last element is the current element. For any other element inside the FocusZone, tab takes the focus outside parent FocusTrapZone
We are getting the same bug! 馃槶
I'd like to provide a codepen repro:
https://codepen.io/anon/pen/NvVEYq?editors=0010
FocusTrapZone is not trapping focus.
However, it works after I remove the FocusZone inside it.
I have a PR open to fix this issue. #4172
This issue needs to be re-opened, as the PR that fixed this issue was reverted.