MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WinForms MenuStrip doesn't deactivate and close when clicking inside a web view
@victorhuangwq is already working on this.
Since Aug 15, 2023.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
The WinForms MenuStrip doesn't deactivate and close when clicking inside a web view. This could be reproduced in the WinForms sample app while the WPF and Win32 sample apps works as expected.
Version
SDK: 1.0.1587.40
Runtime: Release 110.0.1587.63
Framework: WinForms
OS: Win11
Repro Steps
In the WinForms sample app (WebView2WindowsFormsBrowser):
- Open a menu
- Click in the web view
Expected: Web view gets focus and menu deactivates and closes.
Actual: Web view seems to get focus fine but the menu never deactivates and stays open.
Screenshots

Additional context
Under hit transparent mode (--enable-features=msWebView2BrowserHitTransparent) this does work fine but it's not really an option for us since we need to be able to handle key events in the hosted web app before they reach the host.
I couldn't really tell if this is related or similar to #397 or any of the ones mentioned within.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.