Bug 299084
| Summary: | REGRESSION (Safari 26): Overflow hidden on body/html no longer works | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | romain |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 26 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 26 | ||
romain
Since Safari 26 it is no longer possible to disable scrolling the body when a modal dialog is open.
- using iOS Safari 26
- visit http://www.romainmenke.com/safari-overflow-hidden-bug/
- scroll the page
- open the overlay
- scroll the page again
When the overlay is closed the page scrolls, as expected.
The displayed number changes and indicates the current value of `document.documentElement.scrollTop`
When the overlay is open I expect scrolling to be disabled as `overflow: hidden` is set on the body and html.
Instead the body can be scrolled underneath the open overlay, as also indicated by the number.
Repro: https://github.com/romainmenke/safari-overflow-hidden-bug?tab=readme-ov-file
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/160885860>
Simon Fraser (smfr)
What style of Safari UI do you have?
romain
I had this issue with each style of Safari UI.
However when trying this I also considered that maybe a feature flag could be involved.
I first fiddled with some flags without any change.
Then I've reset all feature flags and the problem went away.
I tried to find which flags could have been involved by toggling all features on and off, but I never got the issue to resurface.
Maybe there was some weird combination or left over state from the previous iOS version?
So I guess this issue can be closed as resolved because it doesn't exist when all feature flags have default settings?
Thank you for taking a look!
romain
I tested this also on Browserstack to check if I could reproduce this on an other device and I encountered the same issue there:
iOS 26: https://storage.googleapis.com/shared-files-mrhenry/romain/frank-greyhound-3fde405ba2.mp4
iOS 18: https://storage.googleapis.com/shared-files-mrhenry/romain/compassionate-norwegian-forest-44bab4f756.mp4
I can't check if resetting all feature flags resolves the issue there because access to the settings app is restricted on Browserstack.
romain
This seems fixed in iOS 26.1 when testing on Browserstack.
Can still reproduce there on iOS 26.0
So maybe this can be closed as resolved?
Simon Fraser (smfr)
No, there are still plenty of bugs here.