mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-08 01:38:50 +01:00
This commit is contained in:
parent
0aef5b164c
commit
996d160d8b
1 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import {Constants} from "../../constants";
|
|||
import {focusByRange, getSelectionPosition} from "../../protyle/util/selection";
|
||||
import {getCurrentEditor} from "../editor";
|
||||
import {fontEvent, getFontNodeElements} from "../../protyle/toolbar/Font";
|
||||
import {hideElements} from "../../protyle/ui/hideElements";
|
||||
|
||||
let renderKeyboardToolbarTimeout: number;
|
||||
let showUtil = false;
|
||||
|
|
@ -592,6 +593,7 @@ export const initKeyboardToolbar = () => {
|
|||
return;
|
||||
} else if (["a", "block-ref", "inline-math", "inline-memo"].includes(type)) {
|
||||
if (!hasClosestByAttribute(range.startContainer, "data-type", "NodeCodeBlock")) {
|
||||
hideElements(["util"], protyle);
|
||||
protyle.toolbar.element.querySelector(`[data-type="${type}"]`).dispatchEvent(new CustomEvent("click"));
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue