Skip to content

Commit

Permalink
Merge pull request #802 from chaotixkilla/feat-alter-touch-events
Browse files Browse the repository at this point in the history
Alter touch events to register upon touch
  • Loading branch information
RafaelTaranto authored May 27, 2022
2 parents 4427a9a + fdacfdb commit f935af9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions ui/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ui/js/app.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions ui/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,9 +983,9 @@ function touchEvent (element, callback) {
}

if (shouldEnableTouch()) {
element.addEventListener('touchend', handler)
element.addEventListener('touchstart', handler)
}
element.addEventListener('mouseup', handler)
element.addEventListener('mousedown', handler)
}

function touchImmediateEvent (element, callback) {
Expand All @@ -995,9 +995,9 @@ function touchImmediateEvent (element, callback) {
e.preventDefault()
}
if (shouldEnableTouch()) {
element.addEventListener('touchend', handler)
element.addEventListener('touchstart', handler)
}
element.addEventListener('mouseup', handler)
element.addEventListener('mousedown', handler)
}

function setupImmediateButton (buttonClass, buttonAction, callback) {
Expand Down

0 comments on commit f935af9

Please sign in to comment.