Skip to content

Build your personal knowledge base with Trilium Notes

fix(menu): release a context submenu's opening animation so its blur shows

Elian Doran2991701d30ad
diff --git a/apps/client/src/widgets/react/Menu.css b/apps/client/src/widgets/react/Menu.css
index fe3fdaaa4c..7b2c7cacb3 100644
--- a/apps/client/src/widgets/react/Menu.css
+++ b/apps/client/src/widgets/react/Menu.css
@@ -50,6 +50,16 @@ body.desktop .dropdown-submenu > .dropdown-menu.tn-menu {
}
}
+/*
+ * The theme's opening delay holds a submenu's opacity with `animation-fill-mode: forwards`, which
+ * leaves the layer a backdrop root once it is shown, so its `::before` would blur only the layer's
+ * own inside. `backwards` keeps the layer hidden through the delay and then releases it.
+ */
+body.desktop:not(.motion-disabled) .dropdown-submenu > .dropdown-menu.tn-menu {
+ opacity: 1;
+ animation-fill-mode: backwards;
+}
+
/* The menu holds focus for its keys; the row they act on shows where they are instead. */
.dropdown-menu.tn-menu:focus {
outline: none;