mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 03:10:16 +01:00
This commit is contained in:
parent
2efded088b
commit
6d72ce0e18
2 changed files with 11 additions and 1 deletions
|
|
@ -414,6 +414,9 @@ export const showKeyboardToolbar = () => {
|
|||
if (editor && editor.protyle.wysiwyg.element.contains(range.startContainer)) {
|
||||
editor.protyle.element.parentElement.style.paddingBottom = "42px";
|
||||
}
|
||||
getCurrentEditor().protyle.app.plugins.forEach(item => {
|
||||
item.eventBus.emit("mobile-keyboard-show");
|
||||
});
|
||||
setTimeout(() => {
|
||||
const contentElement = hasClosestByClassName(range.startContainer, "protyle-content", true);
|
||||
if (contentElement) {
|
||||
|
|
@ -435,6 +438,9 @@ export const hideKeyboardToolbar = () => {
|
|||
return;
|
||||
}
|
||||
const toolbarElement = document.getElementById("keyboardToolbar");
|
||||
if (toolbarElement.classList.contains("fn__none")) {
|
||||
return;
|
||||
}
|
||||
toolbarElement.classList.add("fn__none");
|
||||
toolbarElement.style.height = "";
|
||||
const editor = getCurrentEditor();
|
||||
|
|
@ -445,6 +451,9 @@ export const hideKeyboardToolbar = () => {
|
|||
if (modelElement.style.transform === "translateY(0px)") {
|
||||
modelElement.style.paddingBottom = "";
|
||||
}
|
||||
getCurrentEditor().protyle.app.plugins.forEach(item => {
|
||||
item.eventBus.emit("mobile-keyboard-hide");
|
||||
});
|
||||
};
|
||||
|
||||
export const activeBlur = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue