M
M
Mikhail Osher2016-07-13 12:32:37
css
Mikhail Osher, 2016-07-13 12:32:37

How to make friends overflow:hidden in Safari on iOS?

The overflow:hidden hangs on the body, which, as I read, does not work in ios safari.
There is a modal window, position:fixed.
Everywhere everything is fine, but on i-devices the page scrolls under the modal.
How to overcome it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
monochromer, 2016-07-26
@monochromer

Partially helped me for modal window
-webkit-overflow-scrolling: touch;

N
nzy, 2020-11-17
@nzy

Helped me:

touch-action: none;
-ms-touch-action: none;

D
Denis Bukreev, 2016-07-13
@denisbookreev

set height to 100% (or 100vh)

A
Anton Korzunov, 2018-07-15
@kashey

The problem is that mobile safari ignores overflow:hidden on body.
"Today" the most effective way to fight is to simply block the propagation of events that can cause scrolling into the document.
In general - https://github.com/thearnica/dom-locky

M
mexsmg, 2019-02-27
@mexsmg

The problem is that body cannot be set to position. So you need to wrap the entire site in a specific tag, for example wrapper, and add overflow: hidden; height: 100vh; position: relative; In this case, everything will work. Tested on mobile devices in the Safari browser.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question