Touchmove pointer-events: none CSS doesn't work on Chrome for Android 4.4 / ChromeView

后端 未结 2 1232
抹茶落季
抹茶落季 2021-01-01 20:31

I\'m using CSS pointer-events to pass touchmove events through a transparent div. This works everywhere apart from Chrome on Android. I\'m wondering if this is a known iss

2条回答
  •  难免孤独
    2021-01-01 20:42

    I solved this using the solution here: https://stackoverflow.com/a/20387287/1876899

    Thank you very much user wulftone! Somehow preventing the default touchStart event on my overlay allowed the interaction to pass through and trigger the events below.

    overlay.addEventListener('touchstart', function(e){
      e.preventDefault();
    });
    

    or in my case, with jQuery:

    $('.frame-overlay').on('touchstart', function(e){
      e.preventDefault();
    });
    

提交回复
热议问题