mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 10:12:34 +08:00
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:
parent
8f2872a1fc
commit
525f4f43ef
@ -737,7 +737,7 @@ export class Stage extends Container<Layer> {
|
|||||||
|
|
||||||
// always call preventDefault for desktop events because some browsers
|
// always call preventDefault for desktop events because some browsers
|
||||||
// try to drag and drop the canvas element
|
// try to drag and drop the canvas element
|
||||||
if (evt.cancelable) {
|
if (evt.cancelable && eventType !== "touch") {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user