[PR #18854] Implement custom text context menus to fix crashes #31624

Open
opened 2026-01-31 09:48:29 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18854

State: closed
Merged: Yes


This works around a bug in WinUI where it creates a single context menu/flyout for text elements per thread, not per XamlRoot, similar to many other areas. Since the XamlRoot cannot change after creation, this means that once you've opened the flyout, you're locked into that window (= XAML root) forever. You can't open the flyout in another window and once you've closed that window, you can't open it anywhere at all.

Closes #18599

Validation Steps Performed

  • Flies out right click in the
    • About dialog
    • Search dialog
    • Word delimiters setting
    • Launch size setting
  • Across two windows
**Original Pull Request:** https://github.com/microsoft/terminal/pull/18854 **State:** closed **Merged:** Yes --- This works around a bug in WinUI where it creates a single context menu/flyout for text elements per thread, not per `XamlRoot`, similar to many other areas. Since the `XamlRoot` cannot change after creation, this means that once you've opened the flyout, you're locked into that window (= XAML root) forever. You can't open the flyout in another window and once you've closed that window, you can't open it anywhere at all. Closes #18599 ## Validation Steps Performed * Flies out right click in the * About dialog ✅ * Search dialog ✅ * Word delimiters setting ✅ * Launch size setting ✅ * Across two windows ✅
claunia added the pull-request label 2026-01-31 09:48:29 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31624