How to completely remove the vibration of a mobile browser for a long time?

I am trying to completely remove the vibration that occurs when a long click on an item in a mobile browser.

In particular, I have an image in which I add my own long print features, but the thin short vibrator, which happens by default, interferes and I need to turn it off.

I successfully stopped the regular context menu, appearing, overriding it as follows:

window.oncontextmenu = function (event) {
  event.preventDefault();
  event.stopPropagation();
  return false;
};

I also added CSS to stop highlighting and selecting text, etc., but I could not figure out what causes the default vibration after a few hundred ms.

Is there another lifecycle event that occurred when a long press in a mobile browser, inside or outside oncontextmenu?

plunker , ( Android), , : https://plnkr.co/edit/y1KVPltTzEhQeMWGMa1F?p=preview

+4

Source: https://habr.com/ru/post/1685205/


All Articles