Not blocked scroll while on menu
Opened this issue · 4 comments
Alvlopzam commented
While the user is on the menu the scroll is not blocked as expected.
JPIglesias-Triangle commented
$(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.
JPIglesias-Triangle commented
For mobile:
$(window).bind('touchmove', function(event) { event.preventDefault(); });
JPIglesias-Triangle commented
Branch menu-issues
created to solve this issue.
JPIglesias-Triangle commented
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');