Vanessa
2026-05-26 14:35:09 +08:00
parent 8601ada8fc
commit 4fa3956b90
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -9,10 +9,12 @@ export const mobileKeydown = (app: App, event: KeyboardEvent) => {
if (!event.key || filterHotkey(event, app)) {
return;
}
const protyle = getCurrentEditor().protyle;
const matchGeneral = Object.keys(window.siyuan.config.keymap.general).find((key) => {
if (matchHotKey(window.siyuan.config.keymap.general[key].custom, event)) {
execByCommand({command: key, app, protyle, previousRange: protyle.toolbar.range});
const protyle = getCurrentEditor()?.protyle;
if (protyle) {
execByCommand({command: key, app, protyle, previousRange: protyle.toolbar.range});
}
return true;
}
});
+1 -1
View File
@@ -78,7 +78,7 @@ export const handleTouchEnd = (event: TouchEvent) => {
}
}
if (typeof yDiff === "undefined" && window.siyuan.mobile.editor.protyle.options.render.gutter) {
if (typeof yDiff === "undefined" && window.siyuan.mobile.editor?.protyle.options.render.gutter) {
const nodeElement = hasClosestBlock(target);
if (nodeElement) {
if (nodeElement && (nodeElement.classList.contains("list") || nodeElement.classList.contains("li"))) {