Skip to content

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

@papins

Description

@papins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions