Is there a way to disable scrolling? Not just the scrollbar, but the entire functionality from the browser window?
There's another way to disable scrolling that is commonly used when opening modals or scrollable floating elements. And it is simply by adding the CSS property overflow: hidden; on the element you want to prevent the scroll.
Tapping the three dots menu at the top-right of an open and active note will reveal a new “Scroll Lock” option! This means that you can lock the page in place so you won't zoom or pan around with your wrist as you naturally rest it on the screen. Cursive's new “Scroll Lock” option rocks!
based on your answer to Keit you dont want to scroll be active when you have a lightbox open? if that is the case you can add a class to the body at the same time as you open the lightbox with the following css
And the nice thing about this solution it keeps the scroll "space" so the site do not jump, its more like it disables it. hope this helps
body.noscroll
{
position: fixed;
overflow-y: scroll;
width: 100%;
}
$('body').addClass('noscroll');
$('body').removeClass('noscroll');
CSS
body
{
overflow: hidden;
}
javascript
document.body.style.overflow = "hidden";
jQuery
$("body").css('overflow', 'hidden');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With