mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -357,7 +357,7 @@ const renderKeyboardToolbar = () => {
|
||||
const selectText = range.toString();
|
||||
|
||||
if (!nodeElement.classList.contains("code-block") &&
|
||||
(selectText || dynamicElements[0].querySelector('[data-type="goinline"]').classList.contains("protyle-toolbar__item--current"))) {
|
||||
(selectText || dynamicElements[0].querySelector('[data-type="goinline"]').classList.contains("protyle-toolbar__item--current"))) {
|
||||
dynamicElements[0].classList.add("fn__none");
|
||||
dynamicElements[1].classList.remove("fn__none");
|
||||
} else {
|
||||
@@ -415,7 +415,7 @@ const renderKeyboardToolbar = () => {
|
||||
};
|
||||
|
||||
export const showKeyboardToolbar = () => {
|
||||
if (!showUtil) {
|
||||
if (!showUtil || getSelection().rangeCount === 0) {
|
||||
hideKeyboardToolbarUtil();
|
||||
}
|
||||
const toolbarElement = document.getElementById("keyboardToolbar");
|
||||
|
||||
Reference in New Issue
Block a user