mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(mobile): improve submenu triggering
This commit is contained in:
parent
1eecf9a5c8
commit
01322c50ec
@ -168,9 +168,8 @@ class ContextMenu {
|
||||
}
|
||||
|
||||
if (this.isMobile && "items" in item && item.items) {
|
||||
const $target = $(e.target);
|
||||
$target
|
||||
.parents(".dropdown-item")
|
||||
$(e.target)
|
||||
.closest(".dropdown-item")
|
||||
.find("ul.dropdown-menu")
|
||||
.toggleClass("show");
|
||||
e.preventDefault();
|
||||
|
@ -252,18 +252,21 @@ div.ui-tooltip {
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
border: 1px solid var(--dropdown-border-color);
|
||||
.dropdown-menu {
|
||||
color: var(--menu-text-color) !important;
|
||||
font-size: inherit;
|
||||
background-color: var(--menu-background-color) !important;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
body.desktop .dropdown-menu {
|
||||
border: 1px solid var(--dropdown-border-color);
|
||||
box-shadow: 0px 10px 20px rgba(0, 0, 0, var(--dropdown-shadow-opacity));
|
||||
animation: dropdown-menu-opening 100ms ease-in;
|
||||
}
|
||||
|
||||
@supports(animation-fill-mode: forwards) {
|
||||
/* Delay the opening of submenus */
|
||||
.dropdown-submenu .dropdown-menu {
|
||||
body.desktop .dropdown-submenu .dropdown-menu {
|
||||
opacity: 0;
|
||||
animation-fill-mode: forwards;
|
||||
animation-delay: var(--submenu-opening-delay);
|
||||
|
Loading…
x
Reference in New Issue
Block a user