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

Tearsheet: Element focussed twice when using stacked tearsheets #6466

Closed
2 tasks done
mconway-ns1 opened this issue Nov 19, 2024 · 3 comments · Fixed by #6513
Closed
2 tasks done

Tearsheet: Element focussed twice when using stacked tearsheets #6466

mconway-ns1 opened this issue Nov 19, 2024 · 3 comments · Fixed by #6513
Assignees
Labels
component: Tearsheet role: dev Sev 2 Aspects of design is broken and impedes users in a significant way, but has workaround. type: bug 🐛 Something isn't working

Comments

@mconway-ns1
Copy link

Package

Carbon for IBM Products

Description

Expected : selectorPrimaryFocus to be focussed and not blurred
Actual: selectorPrimaryFocus is focused and then focussed again, causing the onBlur to fire with validation

The problem seems to be in TearsheetShell. The handleStackChange.claimFocus and useEffect both focus the element c

Component(s) impacted

https://github.com/carbon-design-system/ibm-products/blob/main/packages/ibm-products/src/components/Tearsheet/TearsheetShell.tsx

Browser

Chrome

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

@carbon/[email protected]

Suggested Severity

Severity 1 = The design is broken in a critical way that blocks users from completing tasks or damages the brand. Affects major functionality, no workaround.

Product/offering

NS1

CodeSandbox or Stackblitz example

https://stackblitz.com/edit/github-1qjirj?file=src%2FExample%2FExample.jsx

Steps to reproduce the issue (if applicable)

see example in stackblitz

Release date (if applicable)

No response

Code of Conduct

@github-project-automation github-project-automation bot moved this to Needs triage 🧐 in Carbon for IBM Products Nov 19, 2024
@elycheea elycheea moved this from Needs triage 🧐 to Backlog 🌋 in Carbon for IBM Products Nov 19, 2024
@elycheea elycheea added type: bug 🐛 Something isn't working Sev 2 Aspects of design is broken and impedes users in a significant way, but has workaround. role: dev labels Nov 19, 2024
@makafsal makafsal moved this from Backlog 🌋 to In progress in Carbon for IBM Products Nov 21, 2024
@makafsal
Copy link
Member

@mconway-ns1 I've tried reproducing the issue after downloading the Stackblitz example you provided, but I can't reproduce it locally.
How did you find this issue in the first place, were you able to reproduce this issue locally?

In Stackblits:

Screen.Recording.2024-11-25.at.6.04.15.PM.mov

In local (downloaded from Stackblits):

Screen.Recording.2024-11-25.at.6.06.04.PM.mov

@mconway-ns1
Copy link
Author

mconway-ns1 commented Nov 25, 2024

@makafsal you will see the onblur fire when opening the second stacked tearsheet

Screen.Recording.2024-11-25.at.14.48.37.mov

@elycheea
Copy link
Contributor

@mconway-ns1 came to our office hours today and shared some investigation on the issue — seems difficult to address without a larger refactor to the TearsheetShell, which uses useEffect pretty liberally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Tearsheet role: dev Sev 2 Aspects of design is broken and impedes users in a significant way, but has workaround. type: bug 🐛 Something isn't working
Projects
Status: Done 🚀
Development

Successfully merging a pull request may close this issue.

3 participants