mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-31 04:02:26 +08:00
fix(mobile): position of editing toolbar when keyboard is hidden
This commit is contained in:
parent
4ee88c1e96
commit
4cfb0d6161
@ -104,7 +104,13 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#adjustPosition() {
|
#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`);
|
this.$widget.css("bottom", `${bottom}px`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user