[Webkit-unassigned] [Bug 236561] Overflow: hidden on documentElement behaves inconsistently in iOS Safari 15.3.1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Feb 13 06:05:36 PST 2022
https://bugs.webkit.org/show_bug.cgi?id=236561
--- Comment #1 from ik at rejh.nl ---
For people stumbling across this:
My current workaround after a bit of testing and weighing the pros and cons is to detect iOS and force the scrollTop = 0. This is not a solution, however, as it's going to become annoying for users very quickly when the page jumps to the top. The alternative, however, may feel even buggier.
Added bonus: Setting scrollbarGutter will prevent layout shifts when the scrollbar dis-/reappears.
// Lock
if (__isIOS) documentElement.scrollTop = 0;
http://documentElement.style.overflow = 'hidden';
http://documentElement.style.scrollbarGutter = 'stable';
// Unlock
http://documentElement.style.overflow = '';
http://documentElement.style.scrollbarGutter = '';
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220213/8feeb6ba/attachment.htm>
More information about the webkit-unassigned
mailing list