This commit is contained in:
Vanessa 2023-10-10 16:15:24 +08:00
parent b0e3efa774
commit 2c36af78bc
14 changed files with 25 additions and 26 deletions

View file

@ -41,7 +41,7 @@ export const globalClick = (event: MouseEvent & { target: HTMLElement }) => {
const copyElement = hasTopClosestByClassName(event.target, "protyle-action__copy");
if (copyElement) {
let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd()
let text = copyElement.parentElement.nextElementSibling.textContent.trimEnd();
text = text.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382
writeText(text);
showMessage(window.siyuan.languages.copied, 2000);

View file

@ -196,7 +196,7 @@ export const initWindow = async (app: App) => {
});
};
ipcRenderer.send(Constants.SIYUAN_EVENT, "onEvent")
ipcRenderer.send(Constants.SIYUAN_EVENT, "onEvent");
ipcRenderer.on(Constants.SIYUAN_EVENT, (event, cmd) => {
if (cmd === "focus") {
if (getSelection().rangeCount > 0) {
@ -227,7 +227,7 @@ export const initWindow = async (app: App) => {
document.getElementById("toolbar").style.paddingLeft = "0";
}
} else {
winOnMaxRestore()
winOnMaxRestore();
}
} else if (cmd === "leave-full-screen") {
if ("darwin" === window.siyuan.config.system.os) {