Skip to content

Incorrect popover placement when using css zoom on body #6431

Open
@RadomirNowak

Description

@RadomirNowak

Provide a general summary of the issue here

Hi!
I'm trying to use zoom feature provided by css, but looks like some of the popovers that use usePopover hook are not rendered correctly - they are rendered out of bounds.
Please see a video where I reproduce the issue on react-aria docs website.
chrome_X4937jp8s9

🤔 Expected Behavior?

Popovers should account for css zoom property when calculating their placement.

😯 Current Behavior

Popovers are rendered outside of body when its zoomed in/out using css zoom

💁 Possible Solution

No response

🔦 Context

We're trying to implement a functionality to make sure that users using smaller screens are using zoomed out version of our app, and zoomed in when they are on bigger resolution. It's a workaround until we make our app more responsive.

🖥️ Steps to Reproduce

  1. Go to docs of usePopover hook -> https://react-spectrum.adobe.com/react-aria/usePopover.html#example
  2. Scroll down to Open popover button
  3. Click it to verify popover opens -> it should
  4. Open browser dev tools
  5. Select body and add property zoom: 0.9 (works everywhere except firefox)
  6. Click again on open popover button
  7. BUG: popover is not visible

Version

3.33.1

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

Windows 11

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions