Skip to content

ContextMenu stops working if its owner is removed from the visual tree #5835

@SamBent

Description

@SamBent

[Port of a servicing fix for .NET 4.7-4.8]

Problem description:
If user invokes a ContextMenu (e.g. right-clicking on its owner), but the owner leaves the visual tree before the ContextMenu actually displays, the ContextMenu never displays again. This is interesting when the ContextMenu is shared by multiple owners - it won't display for other owners, even when the other owners remain in the visual tree normally.

Actual behavior:
Invoking the ContextMenu does nothing.

Expected behavior:
ContextMenu displays

Minimal repro:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions