Skip to content

Commit

Permalink
🩹 Prevent help reset from getting stuck
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Nov 23, 2021
1 parent 553ed7d commit 73f92cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/plugins/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Vue.directive('longpress', {
const timeout = 1500

// Define funtion handlers
// Create timeout ( run function after 1s )
// Create timeout
const start = (e) => {
if (e.type === 'click' && e.button !== 0) {
return
Expand Down Expand Up @@ -60,7 +60,9 @@ Vue.directive('longpress', {
// Cancel timeouts if this events happen
el.addEventListener('click', cancel)
el.addEventListener('mouseout', cancel)
el.addEventListener('mouseup', cancel)
el.addEventListener('touchend', cancel)
el.addEventListener('touchleave', cancel)
el.addEventListener('touchcancel', cancel)
}
})

0 comments on commit 73f92cd

Please sign in to comment.