mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
style(next): toggle arrow on mobile
This commit is contained in:
@@ -170,14 +170,12 @@ class ContextMenu {
|
||||
}
|
||||
|
||||
if (this.isMobile && "items" in item && item.items) {
|
||||
// We run using a timeout to avoid the layout change during event handling, which would trigger the menu to be hidden sometimes.
|
||||
setTimeout(() => {
|
||||
$(e.target)
|
||||
.closest(".dropdown-item")
|
||||
.find("ul.dropdown-menu")
|
||||
.toggleClass("show");
|
||||
}, 0);
|
||||
e.preventDefault();
|
||||
const $item = $(e.target)
|
||||
.closest(".dropdown-item");
|
||||
|
||||
$item.toggleClass("submenu-open");
|
||||
$item.find("ul.dropdown-menu")
|
||||
.toggleClass("show");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user