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

后端 未结 3 847
暗喜
暗喜 2021-02-05 16:56

I am using Pep.js for kinetic drag on multi-touch, but my drag events are not being registered because when I try to drag an object in the safari, on iOS, window the window itse

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 17:46

    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;
    }
    

提交回复
热议问题