Bug 282347
| Summary: | Setting overflow:hidden on <body> (when body is the scrolling element) will only work if Safari address bar is visible | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Zouhir <zouhir> |
| Component: | Scrolling | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | simon.fraser |
| Priority: | P2 | ||
| Version: | Safari 17 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Zouhir
## Repro steps
- Open https://demo-webkit-scroll-lock.glitch.me in Safari Browser
### Case a
- a.1 Make sure Safari Address Bar is **visible**
- a.2 Click lock scrolling button, this will add `overflow: hidden` to the body element
- a.3 Try to scroll up and down
### Case b
- a.1 Make sure Safari Address Bar is **HIDDEN**
- a.2 Click lock scrolling button, this will add `overflow: hidden` to the body element
- a.3 Try to scroll up and down
## Expected
- Case a: locks scrolling / document does not scroll
- Case b: locks scrolling / document does not scroll
## Actual
- Case a: successful, locks scrolling / document does not scroll
- Case b: fails
## Conclusion
The visibility of the address bar seems to interfere with scrolling and Safari's ability to apply consistent overflow rules on the scrolling element when it's both hidden and visible.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
*** This bug has been marked as a duplicate of bug 240859 ***