Fix dbltap event in Safari. close #1209

This commit is contained in:
Anton Lavrenov
2021-12-09 08:57:01 -05:00
parent b39b9a8116
commit a4cc960353
6 changed files with 71 additions and 75 deletions

View File

@@ -671,16 +671,12 @@ export class Stage extends Container<Layer> {
const event = { evt: evt, pointerId };
let fireDblClick = false;
if (
Konva['_' + eventType + 'InDblClickWindow'] &&
Konva['_' + eventType + 'InDblClickWindowId'] === pointerId
) {
if (Konva['_' + eventType + 'InDblClickWindow']) {
fireDblClick = true;
clearTimeout(this[eventType + 'DblTimeout']);
} else if (!DD.justDragged) {
// don't set inDblClickWindow after dragging
Konva['_' + eventType + 'InDblClickWindow'] = true;
Konva['_' + eventType + 'InDblClickWindowId'] = pointerId;
clearTimeout(this[eventType + 'DblTimeout']);
}