make sure preventDefault() is not called on touchend-events per default

* calling `preventDefault()` on touch-events prevents the browser from creating and dispatching the click-event which results in click-listeners of parent dom-nodes not executing even though its expected

Signed-off-by: Clemens Grabmann <clemens.grabmann@cloudflight.io>
This commit is contained in:
Clemens Grabmann 2022-07-25 17:54:28 +02:00
parent 8f2872a1fc
commit 525f4f43ef
No known key found for this signature in database
GPG Key ID: DECEA38C0512852C

View File

@ -737,7 +737,7 @@ export class Stage extends Container<Layer> {
// always call preventDefault for desktop events because some browsers
// try to drag and drop the canvas element
if (evt.cancelable) {
if (evt.cancelable && eventType !== "touch") {
evt.preventDefault();
}
}