Skip to content

Modal's FocusTrapZone, with FocusTrapCallout child, not behaving as expected #8552

@cnamal

Description

@cnamal

Hi folks,

We have a FocusTrapCallout inside a Modal, similar to what's in the following codepen: https://codepen.io/namal-ms/pen/LvEOOb

As you can see, the FocusTrapZone of the Modal doesn't work as expected, and tab focus doesn't cycle through the couple buttons in the modal, and you can get to the background button.

Is this normal? The "Dialog nested in a Panel" example in the FocusTrapZone documentation leads me to believe it isn't expected, but I'm not sure.

When looking for workarounds, I noticed giving the doNotLayer prop to the Callout solves the issue. Could someone please explain the implications of setting doNotLayer to true? 🙂
I'm not well versed in the layering system of Fabric unfortunately.

Apologies if this isn't the right forum for this. If so, please let me know where I should send my questions (Microsoft employee, if that changes anything ^^)

Codepen demonstrating the issue

https://codepen.io/namal-ms/pen/LvEOOb

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions