mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
fix(mobile): position of editing toolbar when keyboard is hidden
This commit is contained in:
@@ -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`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user