mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-24 01:12:06 +03:00
🔀 Merge pull request #1623 from ddenev/master
[Fix] Scolling on mobile brings up menu #1261
This commit is contained in:
commit
89aeb0b007
@ -39,11 +39,17 @@ export default {
|
||||
document.removeEventListener('pointerup', onPointerUp);
|
||||
};
|
||||
|
||||
const onPointerMove = () => {
|
||||
clearTimeout(parseInt(el.dataset.longPressTimeout, 10));
|
||||
document.removeEventListener('pointermove', onPointerMove);
|
||||
};
|
||||
|
||||
const onPointerDown = (e) => {
|
||||
// If event was right-click, then immediately trigger
|
||||
if (e.button === 2) return;
|
||||
startTime = Date.now();
|
||||
document.addEventListener('pointerup', onPointerUp);
|
||||
el.addEventListener('pointermove', onPointerMove);
|
||||
el.addEventListener('click', swallowClick);
|
||||
const timeoutDuration = LONG_PRESS_DEFAULT_DELAY;
|
||||
const timeout = setTimeout(triggerEvent, timeoutDuration);
|
||||
|
Loading…
Reference in New Issue
Block a user