4

I want to handle 'touchstart' event for my mobile site. It worked fine, but now it causes an error in the console.

I tested it with my Galaxi S7 Chrome v72.0 browser, and inspected it with chrome://inspect/#devices extension.

And when I tried touch it causes:

[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

I think problem is actual only for Chrome v72.0 browser.

    var container = document.getElementById('container'),
        fragments = document.createDocumentFragment(),           
        touchScreen = document.createElement('div');

    fragments.appendChild(touchScreen);
    container.appendChild(fragments);

    var mousedownF = function(evt) {
      evt.preventDefault();
      /* Do something */
      return false;
   };

   touchScreen.addEventListener('touchstart', mousedownF);
   touchScreen.addEventListener('mousedown', mousedownF); 
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Suren Sargsyan
  • 63
  • 1
  • 1
  • 8

0 Answers0