Skip to content

Focus not trapped (et al.) by modal if initially active #4764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nwhittaker opened this issue Jun 16, 2022 · 2 comments
Closed

Focus not trapped (et al.) by modal if initially active #4764

nwhittaker opened this issue Jun 16, 2022 · 2 comments
Labels
0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug.

Comments

@nwhittaker
Copy link
Contributor

nwhittaker commented Jun 16, 2022

Actual Behavior

If a <calcite-modal> component is rendered with an active attribute, it behaves differently than if active is enabled later:

  1. Modal appears immediately instead of animating in (possibly expected?)
  2. The modal's calciteModalOpen event never fires
  3. Focus is not trapped by the modal

Expected Behavior

If a <calcite-modal> component is rendered with an active attribute, it behaves the same as when active is enabled later.

Reproduction Sample

https://codepen.io/nwhittaker-esri/pen/YzegaoB?editors=1011

Reproduction Steps

  1. Visit the sample and notice:
    1. The modal does not animate in
    2. calciteModalOpen is not logged to the console
    3. The Back button does not gain focus

Reproduction Version

beta.83

Relevant Info

No response

Regression?

No response

@nwhittaker nwhittaker added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Jun 16, 2022
@nwhittaker nwhittaker changed the title Focus not trapped by modal if active is initially true Focus not trapped (et al.) by modal if initially active Jun 16, 2022
@geospatialem geospatialem added the research Issues that require more in-depth research or multiple team members to resolve or make decision. label Jul 22, 2022
@geospatialem geospatialem added this to the Sprint 07/25 - 08/05 milestone Jul 22, 2022
@geospatialem geospatialem removed needs triage Planning workflow - pending design/dev review. research Issues that require more in-depth research or multiple team members to resolve or make decision. labels Jul 22, 2022
@anveshmekala
Copy link
Contributor

The focus trapping and calciteModalOpen event trigger issues are resolved with beta.93. Could you please verify @nwhittaker. Thanks.

@nwhittaker
Copy link
Contributor Author

Verifying the code sample exhibits the expected behavior with beta.93 -- thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug.
Projects
None yet
Development

No branches or pull requests

3 participants