Skip to content

[Dialog] focusTrapDisabled should only work on non-modal dialogs #12448

Open
@DitwanP

Description

@DitwanP

Check existing issues

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

  1. Open dialog.
  2. Click create popover button inside dialog.
  3. Click outside the popover.
  4. Click tab to navigate through elements
  5. Notice that focus returns to the elements within the popover instead of going back and forth between close dialog button and create popover button.
  6. Comment out the setTimeout on lines 67 through 70 and repeat steps up to 4.
  7. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.Calcite (dev)Issues logged by Calcite developers.bugBug reports for broken functionality. Issues should include a reproduction of the bug.impact - p3 - not time sensitiveUser set priority impact status of p3 - not time sensitiveneeds triagePlanning workflow - pending design/dev review.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions