fix: Prevent scrolling behind menus and modals in Safari iOS (#35183)

This commit is contained in:
diondiondion 2025-06-25 21:22:11 +02:00 committed by GitHub
commit c1ef1f62d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 88 deletions

View file

@ -1,6 +1,20 @@
@use 'variables' as *;
@use 'functions' as *;
html.has-modal {
&,
body {
touch-action: none;
overscroll-behavior: none;
-webkit-overflow-scrolling: auto;
scrollbar-gutter: stable;
}
body {
overflow: hidden !important;
}
}
body {
font-family: $font-sans-serif, sans-serif;
background: var(--background-color);
@ -64,21 +78,6 @@ body {
height: 100%;
padding-bottom: env(safe-area-inset-bottom);
}
&.with-modals--active {
overflow-y: hidden;
overscroll-behavior: none;
margin-right: var(--root-scrollbar-width, 0);
}
}
&.with-modals {
overflow-x: hidden;
overflow-y: scroll;
&--active {
overflow-y: hidden;
}
}
&.player {