Incorrect scroll height calculation clamps overflow scrolling prematurely
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 203
- Avg merge
- 8h 58m
- Merged PRs (30d)
- 112
Description
#### The Bug
Currently, scrollable containers (elements with overflow-y set to scroll or auto, as well as html/body tags with visible) do not always compute their full scrollable range correctly.
Relying solely on final_layout.scroll_height() can underestimate the total height of nested children, leading to early scroll clamping. Users are unable to scroll all the way down to see the bottom-most contents of a container.
#### Steps to Reproduce
1. Create a container with a fixed height and overflow-y: auto.
2. Populate it with absolute or relative layout children that extend beyond the container's height.
3. Attempt to scroll to the bottom. The scroll area is clamped early, clipping the bottom-most children.
```html
Child Element 1 (150px)
Child Element 2 (150px)
Child Element 3 (100px) - Clipped and unreachable via scroll
```
#### Expected Behavior
The scrollable height of a container should span the full bottom coordinate of all layout children plus any padding and border bounds.
Contributor guide
Assessment
This issue has not been assessed yet.