mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-01 18:30:16 +01:00
This commit is contained in:
parent
3a918e70ba
commit
7884ac341d
2 changed files with 4 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ import {promiseTransactions} from "../protyle/wysiwyg/transaction";
|
|||
import {bootSync} from "../dialog/processSystem";
|
||||
import {initMessage} from "../dialog/message";
|
||||
import {goBack} from "./util/MobileBackFoward";
|
||||
import {hideKeyboardToolbar, renderKeyboardToolbar} from "./util/keyboardToolbar";
|
||||
import {hideKeyboardToolbar, showKeyboardToolbar} from "./util/keyboardToolbar";
|
||||
import {getLocalStorage} from "../protyle/util/compatibility";
|
||||
import {openMobileFileById} from "./editor";
|
||||
import {getSearch} from "../util/functions";
|
||||
|
|
@ -86,7 +86,7 @@ new App();
|
|||
window.goBack = goBack;
|
||||
window.showKeyboardToolbar = (height) => {
|
||||
document.getElementById("keyboardToolbar").setAttribute("data-keyboardheight", (height ? height : window.innerHeight / 2 - 42).toString());
|
||||
renderKeyboardToolbar();
|
||||
showKeyboardToolbar();
|
||||
};
|
||||
window.hideKeyboardToolbar = hideKeyboardToolbar;
|
||||
window.openFileByURL = (openURL) => {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ const hideKeyboardToolbarUtil = () => {
|
|||
toolbarElement.querySelector('.keyboard__action[data-type="done"] use').setAttribute("xlink:href", "#iconKeyboardHide");
|
||||
};
|
||||
|
||||
export const renderKeyboardToolbar = () => {
|
||||
const renderKeyboardToolbar = () => {
|
||||
clearTimeout(renderKeyboardToolbarTimeout);
|
||||
renderKeyboardToolbarTimeout = window.setTimeout(() => {
|
||||
if (getSelection().rangeCount === 0 ||
|
||||
|
|
@ -254,7 +254,7 @@ export const renderKeyboardToolbar = () => {
|
|||
}, 620); // 需等待 range 更新
|
||||
};
|
||||
|
||||
const showKeyboardToolbar = () => {
|
||||
export const showKeyboardToolbar = () => {
|
||||
const toolbarElement = document.getElementById("keyboardToolbar");
|
||||
if (!toolbarElement.classList.contains("fn__none")) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue