chore(web): passive events (#19179)
This commit is contained in:
@@ -357,18 +357,18 @@
|
||||
};
|
||||
/* eslint-enable tscompat/tscompat */
|
||||
onMount(() => {
|
||||
document.addEventListener('touchmove', onTouchMove, true);
|
||||
document.addEventListener('touchmove', onTouchMove, { capture: true, passive: true });
|
||||
return () => {
|
||||
document.removeEventListener('touchmove', onTouchMove);
|
||||
document.removeEventListener('touchmove', onTouchMove, true);
|
||||
};
|
||||
});
|
||||
|
||||
onMount(() => {
|
||||
document.addEventListener('touchstart', onTouchStart, true);
|
||||
document.addEventListener('touchend', onTouchEnd, true);
|
||||
document.addEventListener('touchstart', onTouchStart, { capture: true, passive: true });
|
||||
document.addEventListener('touchend', onTouchEnd, { capture: true, passive: true });
|
||||
return () => {
|
||||
document.addEventListener('touchstart', onTouchStart, true);
|
||||
document.addEventListener('touchend', onTouchEnd, true);
|
||||
document.removeEventListener('touchstart', onTouchStart, true);
|
||||
document.removeEventListener('touchend', onTouchEnd, true);
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user