Browse Source
Merge pull request #5322 from AvaloniaUI/fixes/5320-submenu-close-delay
Apply delay when closing submenu due to pointer leave.
release/0.10.0-rc2
Dan Walmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
1 deletions
-
src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
|
|
|
@ -355,7 +355,13 @@ namespace Avalonia.Controls.Platform |
|
|
|
} |
|
|
|
else if (!item.IsPointerOverSubMenu) |
|
|
|
{ |
|
|
|
item.IsSubMenuOpen = false; |
|
|
|
DelayRun(() => |
|
|
|
{ |
|
|
|
if (!item.IsPointerOverSubMenu) |
|
|
|
{ |
|
|
|
item.IsSubMenuOpen = false; |
|
|
|
} |
|
|
|
}, MenuShowDelay); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|