|
@@ -190,6 +190,7 @@ export class WYSIWYG {
|
|
|
|
|
|
private bindCommonEvent(protyle: IProtyle) {
|
|
|
this.element.addEventListener("copy", (event: ClipboardEvent & { target: HTMLElement }) => {
|
|
|
+ window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
|
|
|
// https://github.com/siyuan-note/siyuan/issues/4600
|
|
|
if (event.target.tagName === "PROTYLE-HTML") {
|
|
|
event.stopPropagation();
|
|
@@ -197,7 +198,6 @@ export class WYSIWYG {
|
|
|
}
|
|
|
event.stopPropagation();
|
|
|
event.preventDefault();
|
|
|
- window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
|
|
|
const range = getEditorRange(protyle.wysiwyg.element);
|
|
|
const nodeElement = hasClosestBlock(range.startContainer);
|
|
|
if (!nodeElement) {
|
|
@@ -911,6 +911,7 @@ export class WYSIWYG {
|
|
|
});
|
|
|
|
|
|
this.element.addEventListener("cut", (event: ClipboardEvent & { target: HTMLElement }) => {
|
|
|
+ window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
|
|
|
if (event.target.tagName === "PROTYLE-HTML") {
|
|
|
event.stopPropagation();
|
|
|
return;
|
|
@@ -1265,6 +1266,7 @@ export class WYSIWYG {
|
|
|
});
|
|
|
|
|
|
this.element.addEventListener("paste", (event: ClipboardEvent & { target: HTMLElement }) => {
|
|
|
+ window.siyuan.ctrlIsPressed = false; // https://github.com/siyuan-note/siyuan/issues/6373
|
|
|
// https://github.com/siyuan-note/siyuan/issues/4600
|
|
|
if (event.target.tagName === "PROTYLE-HTML") {
|
|
|
event.stopPropagation();
|