fix(mobile): formatting bar overlapping with bottom bar (fixes #970)

This commit is contained in:
Elian Doran 2025-01-30 19:44:17 +02:00
parent 047b226426
commit 730a43c922
No known key found for this signature in database

View File

@ -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`);
}