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

[docs][base] FocusTrap basic demo not focusing back to the Box in Firefox #37866

Closed
2 tasks done
ZeeshanTamboli opened this issue Jul 8, 2023 · 5 comments
Closed
2 tasks done
Labels
browser: Firefox bug 🐛 Something doesn't work component: FocusTrap The React component. docs Improvements or additions to the documentation external dependency Blocked by external dependency, we can’t do anything about it package: base-ui Specific to @mui/base

Comments

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Jul 8, 2023

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://mui.com/base-ui/react-focus-trap/#basics

Steps:

  1. Go to https://mui.com/base-ui/react-focus-trap/#basics in Firefox browser
  2. Click on "Open" to open the Box.
  3. Scroll down and click anywhere.
  4. It is focused back to the code snippet rather than the demo.

Current behavior 😯

After following the steps, the focus in the Firefox browser returns to the code snippet of the demo instead of the demo box.

Expected behavior 🤔

After following the steps, the focus should return to the Box demo instead of the code snippet in the Firefox browser.

Context 🔦

Originally reported in #37330, it was mistakenly assumed that two separate issues were related to each other. However, they are unrelated. I created this one specifically addressing the Focus trap problem, while keeping the original issue for the Base UI Modal demo. Please note that the issue only occurs in the Firefox browser; it works fine in Google Chrome.

Your environment 🌎

npx @mui/envinfo
Firefox Browser version 115.0.1 (64-bit)
@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work docs Improvements or additions to the documentation package: base-ui Specific to @mui/base browser: Firefox component: FocusTrap The React component. labels Jul 8, 2023
@divyammadhok
Copy link
Contributor

@ZeeshanTamboli I would definitely like to jump in and help in this bug if others don't have the bandwidth for it.

@ZeeshanTamboli
Copy link
Member Author

@divyammadhok Thanks. Feel free to work on it.

@divyammadhok
Copy link
Contributor

Hey @ZeeshanTamboli Please have a look at this PR, in the description I've highlighted 2 ways we can go with this, and have implemented solution #1 as well.

@gitstart
Copy link
Contributor

We are currently working on this @ZeeshanTamboli, we'll be pushing a PR shortly.

@ZeeshanTamboli
Copy link
Member Author

Reason for closing - #37891 (comment)

@ZeeshanTamboli ZeeshanTamboli closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
@ZeeshanTamboli ZeeshanTamboli added the external dependency Blocked by external dependency, we can’t do anything about it label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: Firefox bug 🐛 Something doesn't work component: FocusTrap The React component. docs Improvements or additions to the documentation external dependency Blocked by external dependency, we can’t do anything about it package: base-ui Specific to @mui/base
Projects
None yet
3 participants