mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 画布拖动容易误触
This commit is contained in:
parent
edbb5521b3
commit
541a279fe7
@ -155,12 +155,14 @@ export class ScrollViewer {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
event.stopPropagation();
|
||||
} else if (this.keydown) return;
|
||||
}
|
||||
|
||||
if (event.code !== Keys.ESCAPE || !this.enter || this.keydown) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.keydown = true;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
this.target.style.cursor = 'grab';
|
||||
this.container.addEventListener('mousedown', this.mousedownHandler);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user