Vanessa 2023-03-05 13:19:54 +08:00
parent 5e9f8956ff
commit ba5f10eb52
2 changed files with 2 additions and 4 deletions

View file

@ -6,7 +6,7 @@ import {focusByRange, getSelectionPosition} from "../../protyle/util/selection";
import {removeBlock} from "../../protyle/wysiwyg/remove";
import {hintSlash} from "../../protyle/hint/extend";
export const showKeyboardToolbar = (bottom = 0, height: number) => {
export const showKeyboardToolbar = (height: number) => {
if (getSelection().rangeCount === 0 || window.siyuan.config.editor.readOnly || window.siyuan.config.readonly) {
return;
}
@ -17,8 +17,6 @@ export const showKeyboardToolbar = (bottom = 0, height: number) => {
return;
}
toolbarElement.classList.remove("fn__none");
toolbarElement.style.bottom = bottom + "px";
const range = getSelection().getRangeAt(0);
if (!window.siyuan.mobile.editor ||
!window.siyuan.mobile.editor.protyle.wysiwyg.element.contains(range.startContainer)) {

View file

@ -49,7 +49,7 @@ interface Window {
goBack(): void
showKeyboardToolbar(bottom: number, height: number): void
showKeyboardToolbar(height: number): void
hideKeyboardToolbar(): void