This commit is contained in:
Vanessa 2024-05-06 00:27:28 +08:00
parent 44d4387ca1
commit c5d9b83224
5 changed files with 6 additions and 7 deletions

View file

@ -126,7 +126,7 @@ export const correctHotkey = (app: App) => {
/// #endif
});
}
}
};
export const filterHotkey = (event: KeyboardEvent, app: App) => {
// https://github.com/siyuan-note/siyuan/issues/9848 忘记为什么要阻止了 .av__mask 的情况,测了下没问题就先移除
@ -193,4 +193,4 @@ export const filterHotkey = (event: KeyboardEvent, app: App) => {
window.siyuan.altIsPressed = false;
}
}
}
};

View file

@ -41,7 +41,6 @@ import {unicode2Emoji} from "../../emoji";
import {deleteFiles} from "../../editor/deleteFile";
import {escapeHtml} from "../../util/escape";
import {syncGuide} from "../../sync/syncGuide";
import {showPopover} from "../../block/popover";
import {getStartEndElement, goEnd, goHome} from "../../protyle/wysiwyg/commonHotkey";
import {getNextFileLi, getPreviousFileLi} from "../../protyle/wysiwyg/getBlock";
import {editor} from "../../config/editor";

View file

@ -1,4 +1,4 @@
export const openDock = (type: string) => {
document.getElementById("toolbarFile").dispatchEvent(new CustomEvent("click"));
document.querySelector("#sidebar .toolbar--border").dispatchEvent(new CustomEvent("click", {detail:type}));
}
};

View file

@ -40,4 +40,4 @@ export const mobileKeydown = (app: App, event: KeyboardEvent) => {
event.preventDefault();
return true;
}
}
};

View file

@ -58,8 +58,8 @@ export const addEditorToDatabase = (protyle: IProtyle, range: Range, type?: stri
focusByRange(range);
});
} else {
let targetElement: HTMLElement
const ids: string[] = []
let targetElement: HTMLElement;
const ids: string[] = [];
protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach((item: HTMLElement) => {
if (!targetElement) {
targetElement = item;