mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +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) { |                         if (this.isMobile && "items" in item && item.items) { | ||||||
|                             const $target = $(e.target); |                             $(e.target) | ||||||
|                             $target |                                 .closest(".dropdown-item") | ||||||
|                                 .parents(".dropdown-item") |  | ||||||
|                                 .find("ul.dropdown-menu") |                                 .find("ul.dropdown-menu") | ||||||
|                                 .toggleClass("show"); |                                 .toggleClass("show"); | ||||||
|                             e.preventDefault(); |                             e.preventDefault(); | ||||||
|  | |||||||
| @ -253,17 +253,20 @@ div.ui-tooltip { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .dropdown-menu {     | .dropdown-menu {     | ||||||
|     border: 1px solid var(--dropdown-border-color); |  | ||||||
|     color: var(--menu-text-color) !important; |     color: var(--menu-text-color) !important; | ||||||
|     background-color: var(--menu-background-color) !important; |  | ||||||
|     font-size: inherit;        |     font-size: inherit;        | ||||||
|  |     background-color: var(--menu-background-color) !important; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | body.desktop .dropdown-menu { | ||||||
|  |     border: 1px solid var(--dropdown-border-color); | ||||||
|     box-shadow: 0px 10px 20px rgba(0, 0, 0, var(--dropdown-shadow-opacity)); |     box-shadow: 0px 10px 20px rgba(0, 0, 0, var(--dropdown-shadow-opacity)); | ||||||
|     animation: dropdown-menu-opening 100ms ease-in; |     animation: dropdown-menu-opening 100ms ease-in; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @supports(animation-fill-mode: forwards) { | @supports(animation-fill-mode: forwards) { | ||||||
|     /* Delay the opening of submenus */ |     /* Delay the opening of submenus */ | ||||||
|     .dropdown-submenu .dropdown-menu { |     body.desktop .dropdown-submenu .dropdown-menu { | ||||||
|         opacity: 0; |         opacity: 0; | ||||||
|         animation-fill-mode: forwards; |         animation-fill-mode: forwards; | ||||||
|         animation-delay: var(--submenu-opening-delay); |         animation-delay: var(--submenu-opening-delay); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran