mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
28957d3ba6
commit
374de4e00a
1 changed files with 3 additions and 4 deletions
|
|
@ -438,7 +438,7 @@ export const globalShortcut = () => {
|
||||||
}
|
}
|
||||||
switchDialog = new Dialog({
|
switchDialog = new Dialog({
|
||||||
content: `<div class="fn__flex-column b3-dialog--switch">
|
content: `<div class="fn__flex-column b3-dialog--switch">
|
||||||
<div class="fn__hr"></div>
|
<div class="fn__hr"><input style="opacity: 0;height: 1px;box-sizing: border-box"></div>
|
||||||
<div class="fn__flex">
|
<div class="fn__flex">
|
||||||
<ul class="b3-list b3-list--background" style="max-height: calc(70vh - 35px)">${dockHtml}</ul>
|
<ul class="b3-list b3-list--background" style="max-height: calc(70vh - 35px)">${dockHtml}</ul>
|
||||||
<ul class="b3-list b3-list--background" style="max-height: calc(70vh - 35px)">${tabHtml}</ul>
|
<ul class="b3-list b3-list--background" style="max-height: calc(70vh - 35px)">${tabHtml}</ul>
|
||||||
|
|
@ -454,9 +454,8 @@ export const globalShortcut = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (range) {
|
// 需移走光标,否则编辑器会继续监听并执行按键操作
|
||||||
getSelection().removeAllRanges();
|
switchDialog.element.querySelector("input").focus();
|
||||||
}
|
|
||||||
if (isMac()) {
|
if (isMac()) {
|
||||||
switchDialog.element.addEventListener("contextmenu", (event) => {
|
switchDialog.element.addEventListener("contextmenu", (event) => {
|
||||||
switchDialogEvent(event, switchDialog);
|
switchDialogEvent(event, switchDialog);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue