Skip to content

Build your personal knowledge base with Trilium Notes

fix(mobile): fix offset of the formatting bar

Elian Doran0c544666d821
diff --git a/src/public/app/layouts/mobile_layout.ts b/src/public/app/layouts/mobile_layout.ts
index 2fbe874f42..af1e8120ba 100644
--- a/src/public/app/layouts/mobile_layout.ts
+++ b/src/public/app/layouts/mobile_layout.ts
@@ -180,7 +180,6 @@ export default class MobileLayout {
.child(new NoteListWidget())
.child(new FilePropertiesWidget().css('font-size','smaller'))
)
- .child(new ClassicEditorToolbar())
)
.child(new ProtectedSessionPasswordDialog())
.child(new ConfirmDialog())
@@ -195,6 +194,7 @@ export default class MobileLayout {
.child(new LauncherContainer(true))
.child(new GlobalMenuWidget(true))
.id("launcher-pane")))
+ .child(new ClassicEditorToolbar())
.child(new AboutDialog())
.child(new HelpDialog())
.child(new JumpToNoteDialog())
diff --git a/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.js b/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.js
index 4b59e96dcf..6262bb0c31 100644
--- a/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.js
+++ b/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.js
@@ -34,6 +34,7 @@ const TPL = `\
right: 0;
overflow-x: auto;
background: var(--main-background-color);
+ z-index: 500;
}
body.mobile .classic-toolbar-widget .ck.ck-toolbar {
@@ -70,13 +71,7 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {
window.visualViewport.addEventListener("resize", () => {
const keyboardSize = originalHeight - window.visualViewport.height;
const bottom = Math.max(keyboardSize, originalBottom);
-
- if (keyboardSize !== 0) {
- this.$widget.css("bottom", `${bottom}px`);``
- } else {
- const style = window.getComputedStyle(this.$widget[0]);
- this.$widget.css("bottom", style.getPropertyValue("--launcher-pane-size"));
- }
+ this.$widget.css("bottom", `${bottom}px`);
});
}
}