Skip to content

Computed style height vs. window.innerHeight value #22

@ethul

Description

@ethul

I am seeing an issue where the scroller is indicating that the scroll event is out of bounds, when there should be scrolling that occurs.

It seems that the point where the computed style height is obtained is resulting in a value that is one pixel less than the point where the innerHeight is obtained.

As an example, the computed style height turns out to be 567.171875, but the innerHeight is 568. So the scroll height is zero, and then the out of bounds function results in true, preventing the scroll. Note that there is an extra 30 pixels that should be scrollable in this example (the top/bottom values in the content rect are both 15px).

I am wondering if taking the ceiling of the computed style height would be a possible solution here.

Thanks

PS - After testing a bit more, I am also getting in some cases the computed style height as 567, which is one pixel less than the innerHeight of 568. Perhaps taking the ceiling is not a workable solution.

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