fix(context_menu): regressions on mobile

This commit is contained in:
Elian Doran 2025-12-14 12:02:40 +02:00
parent 34bc444b18
commit 8e6ea87754
No known key found for this signature in database
2 changed files with 13 additions and 5 deletions

View File

@ -1315,13 +1315,16 @@ body.desktop li.dropdown-submenu:hover > ul.dropdown-menu {
top: 0;
inset-inline-start: calc(100% - 2px); /* -2px, otherwise there's a small gap between menu and submenu where the hover can disappear */
margin-top: -10px;
min-width: max-content;
max-width: 300px;
/* to make submenu scrollable https://github.com/zadam/trilium/issues/3136 */
max-height: 600px;
overflow: auto;
}
body.desktop .dropdown-submenu > .dropdown-menu {
min-width: max-content;
max-width: 300px;
}
.dropdown-submenu.dropstart > .dropdown-menu {
inset-inline-start: auto;
inset-inline-end: calc(100% - 2px);

View File

@ -176,7 +176,7 @@ body.desktop .dropdown-submenu .dropdown-menu {
cursor: default !important;
}
.dropdown-menu:has(> .dropdown-submenu.dropstart) > .dropdown-item {
body.desktop .dropdown-menu:has(> .dropdown-submenu.dropstart) > .dropdown-item {
padding-inline-end: var(--menu-item-start-padding) !important;
padding-inline-start: var(--menu-item-end-padding) !important;
}
@ -254,7 +254,8 @@ html body .dropdown-item[disabled] {
}
/* Menu item arrow */
.dropdown-submenu:not(.dropstart) .dropdown-toggle::after {
body.mobile .dropdown-submenu .dropdown-toggle::after,
body.desktop .dropdown-submenu:not(.dropstart) .dropdown-toggle::after {
content: "\ed3b" !important;
position: absolute;
display: flex !important;
@ -270,7 +271,11 @@ html body .dropdown-item[disabled] {
color: var(--menu-item-arrow-color) !important;
}
.dropdown-submenu.dropstart .dropdown-toggle::before {
body.mobile .dropdown-submenu.dropstart .dropdown-toggle::before {
content: unset;
}
body.desktop .dropdown-submenu.dropstart .dropdown-toggle::before {
content: "\ea4d" !important;
position: absolute;
display: flex !important;