Repository navigation
fix(menubar): cycle through flyouts when different menu items are hovered - #13918
ramezgerges wants to merge 3 commits into
Conversation
|
|
||
| internal bool IsFlyoutOpen { get; set; } | ||
|
|
||
| internal void OnMenuBarItemFlyoutPresenterPointerMoved(PointerRoutedEventArgs e) |
There was a problem hiding this comment.
Can you add a comment that this is a workaround for lack of support of OverlayInputPassThroughElement? So that once OverlayInputPassThroughElement is properly implemented, we can properly implement this.
There was a problem hiding this comment.
@ramezgerges If it is, does the PR for #12681 remove need for this change?
There was a problem hiding this comment.
I suppose it would. We would still need to add the logic for opening and closing the flyouts, but it will be in the PointerEntered and PointerExited of each menu item instead of PointerMoved of the flyout.
There was a problem hiding this comment.
@ramezgerges The logic for that is already in place
uno/src/Uno.UI/Microsoft/UI/Xaml/Controls/MenuBar/MenuBarItem.cs
Lines 165 to 174 in 6afedad
| var menuBar = m_menuBar; | ||
| var presenter = m_flyout.m_presenter; | ||
| PointerEventHandler pointerMovedHandler = (_, e) => menuBar.OnMenuBarItemFlyoutPresenterPointerMoved(e); | ||
| m_flyout._popup.PopupPanel.PointerMoved += pointerMovedHandler; | ||
| _menuBarPointerMovedDisposable.Disposable = new DisposableAction(() => presenter.PointerMoved -= pointerMovedHandler); |
There was a problem hiding this comment.
This block of code should be marked Uno specific too, with a comment indicating that this is a workaround for the lack of OverlayInputPassThroughElement
|
Currently blocked (as in, waiting to see if we need this hack or not) by #13968 |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
GitHub Issue (If applicable): closes #13826
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Copilot Summary
🤖 Generated by Copilot at 14de648
This pull request improves the mouse interaction with the
MenuBarandMenuBarItemcontrols by adding and handling pointer moved events. This allows the user to navigate the menu bar items using the mouse pointer as if they were using the keyboard. This also fixes a bug where the menu bar items do not open or close properly when the mouse pointer moves over them.PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):