Greetings to you comrades! Please help me deal with the very strange problem of scrolling the site.

There is a site, and the site has a menu that appears when the user presses the menu button. Opening the menu and starting to scroll through the list located in this very menu, the site starts to scroll, but this is only on ios, fortunately there is no such thing on android ... Help me deal with this problem.

Example

  • Code in the studio, please - ThisMan
  • To be more precise, for body set overflow: hidden when opening the form. - YourDeveloper
  • For the body I have already tried to set overflow: hidden and this did not help ... And to be more precise, it does not work only on the iphone, but on android everything works fine. Perfectly corrects the situation position: fixed noooooo when you open the menu, the site immediately scrolls up. - Nikita N

1 answer 1

Comrades! Everything I figured out with this problem, you can not send answers with a solution. =) For those who encountered the same problem and came here to find a solution, I am writing my own version of how to remove unwanted modal window scrolling.

CSS

body {position: fixed};

Js

document.getElementById ('# ButtonMenu'). onclick = function () {

document.getElementsByTagName ("body") [0] .style.marginTop = "-" + scrollY + 'px';

}

Syyovato, but this is enough for you.