fix(mobile): position of editing toolbar

This commit is contained in:
Elian Doran 2025-01-16 15:48:56 +02:00
parent 7dfeb20678
commit 1d6e3af9aa
No known key found for this signature in database
3 changed files with 4 additions and 9 deletions

View File

@ -31,7 +31,7 @@ const TPL = `\
align-items: flex-end; align-items: flex-end;
position: absolute; position: absolute;
left: 0; left: 0;
bottom: 0; bottom: calc(var(--tab-bar-height) + var(--launcher-pane-height) + var(--mobile-bottom-offset));
right: 0; right: 0;
overflow-x: auto; overflow-x: auto;
z-index: 500; z-index: 500;

View File

@ -230,14 +230,7 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
$classicToolbarWidget[0].appendChild(editor.ui.view.toolbar.element); $classicToolbarWidget[0].appendChild(editor.ui.view.toolbar.element);
if (utils.isMobile()) { if (utils.isMobile()) {
this.$editor.on("focus", (e) => {
$classicToolbarWidget.addClass("visible"); $classicToolbarWidget.addClass("visible");
});
// Hide the formatting toolbar
this.$editor.on("focusout", (e) => {
this.$editor[0].focus();
});
} }
} }

View File

@ -45,6 +45,8 @@ body {
--native-titlebar-foreground: var(--main-text-color); --native-titlebar-foreground: var(--main-text-color);
--native-titlebar-darwin-x-offset: 10; --native-titlebar-darwin-x-offset: 10;
--native-titlebar-darwin-y-offset: 12; --native-titlebar-darwin-y-offset: 12;
--launcher-pane-height: 53px;
--tab-bar-height: 40px;
} }
body.mobile .desktop-only { body.mobile .desktop-only {