Skip to content
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

Tab focus is set outside parent Dialog component when child Dialog/Confirm component closes #4502

Closed
1 task done
kishanivelupillai-sage opened this issue Oct 20, 2021 · 2 comments · Fixed by #4544
Closed
1 task done

Comments

@kishanivelupillai-sage
Copy link

Current behaviour

When using a Dialog/Confirm component inside a parent Dialog, tab behaviour is as follows:

  1. User opens Parent Dialog
  2. User tabs through elements inside Parent Dialog
  3. User opens either Child/Confirm Dialog
  4. User tabs through elements inside Child/Confirm Dialog
  5. User closes Child/Confirm Dialog
  6. Tab focus is set outside Parent Dialog
tab.focus.behaviour.mov

Expected behaviour

Tab focus is expected to be set back inside parent Dialog when child Dialog/Confirm component closes

CodeSandbox or Storybook URL

https://codesandbox.io/s/great-fast-e7of6?file=/src/index.js

JIRA Ticket (Sage Only)

SBS-20824

Suggested Solution

No response

Carbon Version

91.0.2

What browsers are you seeing the problem on?

Chrome

What Operating System are you seeing the problem on?

MacOS

Anything else we should know?

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@nicktitchmarsh nicktitchmarsh added On Backlog and removed triage Triage Required labels Oct 26, 2021
@Parsium
Copy link
Contributor

Parsium commented Oct 26, 2021

FE-4422

edleeks87 added a commit that referenced this issue Nov 18, 2021
…hen stacked modals are closed

When there are at least two  `Modal`s stacked and one closes the `ModalManager` will trigger a
callback to set a flag which is passed to the `FocusTrap` via `ModalContext` and triggers
refocussing of an element within the top most `Modal`

fix #4502
carbonci pushed a commit that referenced this issue Nov 18, 2021
## [100.1.0](v100.0.0...v100.1.0) (2021-11-18)

### Features

* **focus-trap:** add flag to trigger refocus of either last focused element first element ([5ae3922](5ae3922))

### Bug Fixes

* **modal, modal-manager:** modal and manager now set a refocus flag when stacked modals are closed ([5b9c5f7](5b9c5f7)), closes [#4502](#4502)
@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 100.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants