Skip to content

Commit

Permalink
fix: dont show hover effects when touch scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaUnknown committed Dec 25, 2023
1 parent 127b574 commit 4bc6981
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/modules/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export function hoverClick (node, [cb = noop, hoverUpdate = noop]) {
lastHoverElement = hoverUpdate
if (e.pointerType === 'mouse') hoverUpdate(false)
})
node.addEventListener('pointermove', e => {
if (e.pointerType === 'touch') hoverUpdate(false)
})
}

const Directions = { up: 1, right: 2, down: 3, left: 4 }
Expand Down

0 comments on commit 4bc6981

Please sign in to comment.