How to fix“Miss a drag as we are waiting for WebCore's response for touch down”

前端 未结 3 433
自闭症患者
自闭症患者 2021-01-01 12:06

I am developing a webView based android application and was trying to capture the touch events. however it is not working and i saw this message in the log:

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-01 13:02

    I fixed this issue with adding

        document.addEventListener( 'touchstart', function(e){ onStart(e); }, false );
        function onStart ( touchEvent ) {
          if( navigator.userAgent.match(/Android/i) ) {
            touchEvent.preventDefault();
          }
        }
    

提交回复
热议问题