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

When zooming out, the default scroolbar is shown in FF #40

Open
papins opened this issue Aug 24, 2023 · 0 comments
Open

When zooming out, the default scroolbar is shown in FF #40

papins opened this issue Aug 24, 2023 · 0 comments

Comments

@papins
Copy link

papins commented Aug 24, 2023

I read previous discussion about the same error #15
Provided fix (#17) works fine for Chrome (Win10), but does not for Firefox (dev edition 117.0b9 (64-bit) + Win10)

Example: https://2n8jhh.csb.app/
(source https://codesandbox.io/s/rc-scrollbars-test-forked-2n8jhh)
image

The problem is with function getPxRatio() src/utils/getScrollbarWidth.ts
In FF window.screen.availWidth === document.documentElement.clientWidth for all zoom levels when page body doesn't have vertical scrollbar. Function always returns 1 and that does not trigger the scrollbarWidth updating.

window.screen.availWidth !== document.documentElement.clientWidth when page has vertical scrollbar. In this case scrollbarWidth is updating correctly.

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