Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(mobile): formatting bar overlapping with bottom bar (fixes #970)
Elian Doran730a43c922ec
diff --git a/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.ts b/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.tsindex 1c6e7bc8a1..e28f57dc2f 100644--- a/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.ts+++ b/src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.ts@@ -119,10 +119,8 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {#adjustPosition() {let bottom = window.innerHeight - (window.visualViewport?.height || 0);- if (bottom === 0) {- // The keyboard is not visible, align it to the launcher bar instead.- bottom = document.getElementById("mobile-bottom-bar")?.offsetHeight || 0;- }+ // When the keyboard is not visible, align it to the launcher bar instead.+ bottom = Math.max(bottom, document.getElementById("mobile-bottom-bar")?.offsetHeight || 0);this.$widget.css("bottom", `${bottom}px`);}