Prevent iOS safari from moving web-page window so drag event can happen

↘锁芯ラ 提交于 2019-12-03 02:14:52

I have found this solution while working with the #ionicframework

CSS:

html, body {
  overflow:hidden;
}

JS:

$(window).bind(
  'touchmove',
   function(e) {
    e.preventDefault();
  }
);

Your animation is what is causing the issue.

Well, the class your animation is being applied to.

Remove the class after the animation is done.

setTimeout(function(){
    $('#tabViewWindow').removeClass('animated').removeClass('bounceInRight');
}, 1200);

Also, to disable scrolling on the window:

html, body{
    overflow:hidden;
}

Try to add

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>

To head tag in your html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!