This commit is contained in:
Vanessa 2023-11-22 16:18:32 +08:00
parent 1a2bc5208e
commit ccb95c7132
3 changed files with 10 additions and 6 deletions

View file

@ -61,10 +61,12 @@ export const hideAllElements = (types: string[]) => {
if (types.includes("util")) {
/// #if MOBILE
const editor = getCurrentEditor();
editor.protyle.toolbar.subElement.classList.add("fn__none");
if (editor.protyle.toolbar.subElementCloseCB) {
editor.protyle.toolbar.subElementCloseCB();
editor.protyle.toolbar.subElementCloseCB = undefined;
if (editor) {
editor.protyle.toolbar.subElement.classList.add("fn__none");
if (editor.protyle.toolbar.subElementCloseCB) {
editor.protyle.toolbar.subElementCloseCB();
editor.protyle.toolbar.subElementCloseCB = undefined;
}
}
/// #else
getAllEditor().forEach(item => {