mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-29 19:56:10 +01:00
📱
This commit is contained in:
parent
e7a36fea1a
commit
51b710543d
1 changed files with 6 additions and 5 deletions
|
|
@ -223,11 +223,6 @@ export const initKeyboardToolbar = () => {
|
|||
} else if (type === "redo") {
|
||||
protyle.undo.redo(protyle);
|
||||
return;
|
||||
} else if (type === "goinline") {
|
||||
const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
|
||||
dynamicElements[1].classList.remove("fn__none");
|
||||
dynamicElements[0].classList.add("fn__none");
|
||||
return;
|
||||
}
|
||||
if (getSelection().rangeCount === 0) {
|
||||
return;
|
||||
|
|
@ -245,6 +240,12 @@ export const initKeyboardToolbar = () => {
|
|||
range.collapse(true);
|
||||
focusByRange(range);
|
||||
return;
|
||||
} else if (type === "goinline") {
|
||||
const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
|
||||
dynamicElements[1].classList.remove("fn__none");
|
||||
dynamicElements[0].classList.add("fn__none");
|
||||
focusByRange(range);
|
||||
return;
|
||||
} else if (["a", "block-ref", "inline-math", "inline-memo", "text"].includes(type)) {
|
||||
protyle.toolbar.element.querySelector(`[data-type="${type}"]`).dispatchEvent(new CustomEvent("click"));
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue