MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: ContextMenu Persisting Through ParentWindow Move.

Open
#5,677 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

When running WebView2CompositionControl if a user right-clicks to open a context menu, it will persist if the user clicks and drags the parent window. Stepping through the code WebView2CompositionControl_LocationChanged appears to be fired, but the location changing isn't resulting in the context menu closing as it does in Edge and other browsers.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WPF

Operating System

Windows 11

OS Version

No response

Repro steps

The WebView2WpfCompositionControl project under WebView2Samples demonstrates this issue. Run the app, and once the browser is visible right click anywhere on the screen and then move the browser by clicking and dragging the MainWindow.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebView2WpfCompositionControl project under WebView2Samples and inspect WebView2CompositionControl_LocationChanged while reproducing the issue by dragging MainWindow with the context menu open. Done means the context menu closes when the parent window moves, matching the behavior in Edge.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.