fix(mobile): position of editing toolbar when keyboard is hidden

This commit is contained in:
Elian Doran 2025-01-05 10:52:17 +02:00
parent 4ee88c1e96
commit 4cfb0d6161
No known key found for this signature in database

View File

@ -104,7 +104,13 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {
}
#adjustPosition() {
const bottom = window.innerHeight - window.visualViewport.height;
let bottom = window.innerHeight - window.visualViewport.height;
if (bottom === 0) {
// The keyboard is not visible, align it to the launcher bar instead.
bottom = document.getElementById("mobile-bottom-bar")?.offsetHeight || 0;
}
this.$widget.css("bottom", `${bottom}px`);
}