Open
Description
Check existing issues
- I have checked for existing issues to avoid duplicates
Actual Behavior
focusTrapDisabled
is currently working on dialogs
that are modal if it set after a delay.
This was discovered in a workaround for issue #12279
Expected Behavior
focusTrapDisabled
should only work on non-modal dialogs
only. (See issue #10685)
Reproduction Sample
https://codepen.io/Ditwan-Price/pen/wBabQme?editors=1011
Reproduction Steps
- Open dialog.
- Click create popover button inside dialog.
- Click outside the popover.
- Click tab to navigate through elements
- Notice that focus returns to the elements within the popover instead of going back and forth between close dialog button and create popover button.
- Comment out the
setTimeout
on lines 67 through 70 and repeat steps up to 4. - Notice the focus is behaving as expected since
focusTrapDisabled
should not work on modal dialogs.
Reproduction Version
3.2.1
Relevant Info
No response
Regression?
No response
Priority impact
impact - p3 - not time sensitive
Impact
No response
Calcite package
- @esri/calcite-components
- @esri/calcite-components-react
- @esri/calcite-design-tokens
- @esri/calcite-ui-icons
- @esri/eslint-plugin-calcite-components
Esri team
Calcite (dev)