This commit is contained in:
Vanessa 2023-09-05 09:39:57 +08:00
parent a03dda30ea
commit 20270f67e9
6 changed files with 9 additions and 9 deletions

View file

@ -822,7 +822,7 @@ app.whenReady().then(() => {
});
});
}
})
});
});
ipcMain.on("siyuan-send_windows", (event, data) => {
BrowserWindow.getAllWindows().forEach(item => {

View file

@ -73,4 +73,4 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
) {
currentPDFViewerObject.findBar.close();
}
}
};

View file

@ -1308,10 +1308,10 @@ export const sendGlobalShortcut = (app: App) => {
app.plugins.forEach(plugin => {
plugin.commands.forEach(command => {
if (command.globalCallback) {
hotkeys.push(command.customHotkey)
hotkeys.push(command.customHotkey);
}
})
})
});
});
ipcRenderer.send(Constants.SIYUAN_HOTKEY, {
languages: window.siyuan.languages["_trayMenu"],
id: getCurrentWindow().id,

View file

@ -115,4 +115,4 @@ export const windowKeyUp = (app: App,event:KeyboardEvent, switchDialog:Dialog)
switchDialog = undefined;
}
}
}
};

View file

@ -253,7 +253,7 @@ export const bindMenuKeydown = (event: KeyboardEvent) => {
|| event.altKey || event.shiftKey || isCtrl(event)) {
return false;
}
const target = event.target as HTMLElement
const target = event.target as HTMLElement;
if (window.siyuan.menus.menu.element.contains(target) && (target.tagName === "INPUT" || target.tagName === "TEXTAREA")) {
return false;
}

View file

@ -150,10 +150,10 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
editableElement.innerHTML = replaceInnerHTML;
}
}
const editWbrElement = editableElement.querySelector("wbr")
const editWbrElement = editableElement.querySelector("wbr");
if (editWbrElement && editableElement && !trimStartText.endsWith("\n")) {
// 数学公式后无换行,后期渲染后添加导致 rang 错误,中文输入错误 https://github.com/siyuan-note/siyuan/issues/9054
const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement
const previousElement = hasPreviousSibling(editWbrElement) as HTMLElement;
if (previousElement && previousElement.nodeType !== 3 && previousElement.dataset.type.indexOf("inline-math") > -1 &&
!hasNextSibling(editWbrElement)) {
editWbrElement.insertAdjacentText("afterend", "\n");