NEW 222777
overflow-x: hidden on <body> element not respected
https://bugs.webkit.org/show_bug.cgi?id=222777
Summary overflow-x: hidden on <body> element not respected
kevin.lau.kh
Reported 2021-03-04 20:46:35 PST
Created attachment 422331 [details] Sample HTML to illustrate <body> `overflow-x: hidden` issue When `overflow-x: hidden` is set on the body element, Safari is not fully respecting it. All it seems to be doing is hiding the horizontal scroll bar, but not actually preventing contenting from overflowing horizontally ie. you could still scroll to the content outside body area. This is a bug because with `overflow: hidden` (ie. combination of overflow-x and overflow-y hidden) is set, then scrolling IS actually prevented. All other major browsers (Chrome, IE, Edge, Firefox) both 1) disable horizontal scroll bar, AND 2) prevent horizontally scrolling. Simple sample HTML attached.
Attachments
Sample HTML to illustrate <body> `overflow-x: hidden` issue (465 bytes, text/html)
2021-03-04 20:46 PST, kevin.lau.kh
no flags
Radar WebKit Bug Importer
Comment 1 2021-03-05 13:41:22 PST
Benoît Rouleau
Comment 2 2025-06-15 16:21:10 PDT
Same problem with `overflow-x: clip`.
Note You need to log in before you can comment on or make changes to this bug.