Skip to content

Build your personal knowledge base with Trilium Notes

fix(mobile/text): keep a closing menu in place while its place is held

Elian Doranebae66c55519
diff --git a/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.css b/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.css
index 86ea74e86e..3bc2009ac1 100644
--- a/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.css
+++ b/apps/client/src/widgets/type_widgets/text/mobile_editor_toolbar.css
@@ -106,6 +106,13 @@ body.mobile {
animation: none;
}
+ /* `playClosing()` in Popup.tsx removes the copy once this animation ends or is replaced, as
+ it is when `keyboard-panel-open` goes; 1.5s covers `PRESS_TIMEOUT` plus
+ `KEYBOARD_RETURN_TIMEOUT` in mobile_editor_toolbar.tsx. */
+ &.keyboard-panel-open .dropdown-menu.mobile-bottom-menu.keyboard-panel[data-closing] {
+ animation: tn-keyboard-panel-hold 1.5s;
+ }
+
&.keyboard-panel-open .classic-toolbar-island,
.virtual-keyboard-opened .classic-toolbar-island {
--mobile-toolbar-fade: 24px;
@@ -220,3 +227,9 @@ body.mobile {
.classic-toolbar-widget .ck.ck-button.ck-disabled {
opacity: 0.3;
}
+
+@keyframes tn-keyboard-panel-hold {
+ to {
+ translate: 0 0;
+ }
+}