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

[ResizeObserver] with device pixel content box does not take into account visualViewport.scale #11412

Open
greggman opened this issue Dec 24, 2024 · 0 comments

Comments

@greggman
Copy link

ResizeObserver is supposed to return devicePixelContentBox which is the number of device pixels of an observed element's content box. But, if you pinch to zoom (Chrome Mac, 2 finger or AFAIK any Android phone), the number of device pixels changes but ResizeObserver's event is not fired nor does the actual reported size of devicePixelContentBox change if you refresh a pinch to zoom page.

This means you can't actually get the correct device pixels. You can multiply by scale but you end up with the same problem devicePixelContentBox was designed to solve.

Can this be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant