From b471b82d5a30c696378fa1277cd1b8520d219a75 Mon Sep 17 00:00:00 2001 From: Francesco Negri Date: Tue, 23 Jun 2015 16:47:51 +0100 Subject: [PATCH] Scrolling on mobile, fixes #1, fixes #8 --- assets/js/vendor/post-header-animationsb146.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/assets/js/vendor/post-header-animationsb146.js b/assets/js/vendor/post-header-animationsb146.js index 67f2497a5..b5629fb1a 100644 --- a/assets/js/vendor/post-header-animationsb146.js +++ b/assets/js/vendor/post-header-animationsb146.js @@ -46,25 +46,14 @@ } } - function touchmove(e) { - preventDefault(e); - } - - function wheel(e) { - // for IE - //if( ie ) { - //preventDefault(e); - //} - } - function disable_scroll() { - window.onmousewheel = document.onmousewheel = wheel; document.onkeydown = keydown; - document.body.ontouchmove = touchmove; + window.addEventListener( 'touchmove', scrollPage ); } function enable_scroll() { window.onmousewheel = document.onmousewheel = document.onkeydown = document.body.ontouchmove = null; + window.removeEventListener( 'touchmove', scrollPage ); } var docElem = window.document.documentElement, @@ -147,4 +136,4 @@ } -})(); \ No newline at end of file +})();