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

[RAC] Select closes immediately on Firefox when scrolled and body has overflow: hidden #7556

Open
agos opened this issue Dec 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@agos
Copy link

agos commented Dec 30, 2024

Provide a general summary of the issue here

When these three conditions are met:

  • Firefox is being used
  • body tag has overflow: hidden
  • one of the ancestors of the Select has been scrolled from the initial position

clicking or interacting with the select with the keyboard to open it will result in the Select opening and immediately closing. Judging on which callbacks get called, it gains focus but does not lose it.

🤔 Expected Behavior?

The Select stays open

😯 Current Behavior

The Select immediately closes

💁 Possible Solution

The workaround I'll be using will be to remove overflow: hidden from the body tag

🔦 Context

No response

🖥️ Steps to Reproduce

Here is a CodeSandbox that shows the behavior. To reproduce, open the link with Firefox (I used version 133), scroll down a bit and then try to open the select.

You can also reproduce the issue on the Storybook by manually adding overflow: hidden to the body inside the iframe for the component.

Here is a video showing the example in action:

Registrazione.schermo.2024-12-30.alle.18.18.33.mov

Version

react-aria-components 1.5.0, no difference on 1.4.1

What browsers are you seeing the problem on?

Firefox

If other, please specify.

No response

What operating system are you using?

MacOS 15.1

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@yihuiliao
Copy link
Member

Looks like it broke in #7368 where we updated things to be strict compliant

@yihuiliao yihuiliao added the bug Something isn't working label Jan 2, 2025
@reidbarber
Copy link
Member

Possibly will be fixed by #7541?

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

3 participants