Skip to content

Commit 730a43c

Browse files
committed
fix(mobile): formatting bar overlapping with bottom bar (fixes #970)
1 parent 047b226 commit 730a43c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/public/app/widgets/ribbon_widgets/classic_editor_toolbar.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,8 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {
119119
#adjustPosition() {
120120
let bottom = window.innerHeight - (window.visualViewport?.height || 0);
121121

122-
if (bottom === 0) {
123-
// The keyboard is not visible, align it to the launcher bar instead.
124-
bottom = document.getElementById("mobile-bottom-bar")?.offsetHeight || 0;
125-
}
122+
// When the keyboard is not visible, align it to the launcher bar instead.
123+
bottom = Math.max(bottom, document.getElementById("mobile-bottom-bar")?.offsetHeight || 0);
126124

127125
this.$widget.css("bottom", `${bottom}px`);
128126
}

0 commit comments

Comments
 (0)