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

Focus not moving when switching to a different widget #195

Closed
mayank99 opened this issue Mar 8, 2023 · 2 comments
Closed

Focus not moving when switching to a different widget #195

mayank99 opened this issue Mar 8, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mayank99
Copy link

mayank99 commented Mar 8, 2023

Describe the bug

Today we had someone report an interesting issue in iTwinUI: iTwin/iTwinUI#1122

We offered them a workaround but the root cause of this is that focus stays inside the old widget even after clicking on the new widget.

This can be confirmed by creating a watch expression for document.activeElement in chrome devtools.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.itwinjs.org/sandbox/MuthuKalamani/ElevationChange
  2. Create a watch expression for document.activeElement
  3. Click on the "Elevation" slider to see tooltip. Focus is on slider thumb.
  4. Click on "EmptyWidgetProvider".
  5. See tooltip still visible. Focus is still on slider thumb.

Expected behavior

Focus should move to the new tab.

Screenshots

N/A

Desktop (please complete the applicable information):

  • OS: macOS
  • Browser: Chrome
  • Version: ?
  • iTwin.js Version: 3.5.5

Additional context

This is likely because the tabs are made up of divs rather than buttons.

iTwinUI Tabs can handle all this for you and more (like keyboard navigation). https://itwin.github.io/iTwinUI/react/?path=/story/core-tabs--default-tabs

I'm also not sure if this issue should be opened in appui or in viewer. Let me know if this isn't the right place and I can move it.

@calebmshafer calebmshafer added bug Something isn't working needs triage requires further investigation before proceeding with implementation labels Mar 10, 2023
@muthubentley
Copy link

Partner who reported this bug would like to have this fixed by end of March or early April. Requesting to prioritize.

@raplemie raplemie added the appui label Mar 14, 2023
@raplemie raplemie self-assigned this Mar 15, 2023
@raplemie raplemie removed the needs triage requires further investigation before proceeding with implementation label Mar 27, 2023
@raplemie
Copy link
Contributor

raplemie commented May 1, 2023

Change in behavior have been released in 4.0.0

@raplemie raplemie closed this as completed May 1, 2023
@raplemie raplemie added this to the AppUi 4.0 milestone May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants