Open Alvlopzam opened 6 years ago
$(window).bind('mousewheel', function(event) { event.preventDefault(); });
This snippet blocks scrolling, however, it seems the only way of cancelling it is to reload the page. Will look into alternatives.
For mobile:
$(window).bind('touchmove', function(event) { event.preventDefault(); });
Branch menu-issues
created to solve this issue.
Managed to get it blocked when user opens the menu, but only managed to unblock it if the user clicks outside the menu trigger.
// Block
$('body').bind('mousewheel', function(event) { event.preventDefault(); });
$('body').bind('touchmove', function(event) { event.preventDefault(); });
// Unblock
$('body').unbind('mousewheel');
$('body').unbind('touchmove');
While the user is on the menu the scroll is not blocked as expected.