Disable background scrolling when the mobile menu is active on ios

Disabling background scrolling when a mobile menu is active on iOS can be achieved using the touch-action and -ms-touch-action CSS properties, which help control how touch input is handled by the browser. However, keep in mind that -ms-touch-action is a proprietary property and is specifically for Internet Explorer, not iOS.

/* Disable touch events for the element with the menu */  

touch-action: none;      

/* For Internet Explorer */ 

 -ms-touch-action: none;

Leave a comment

Your email address will not be published. Required fields are marked *