mirror of
https://github.com/zed-industries/zed.git
synced 2026-08-22 07:24:18 +00:00
# Objective The contextmenu listener cancelled the browser's native menu unconditionally, so pages hosting a gpui app lost right-click entirely wherever the app showed no menu of its own, and apps that do show one had no native menu to suppress selectively. ## Solution Record whether the right-button MouseDown dispatch was consumed (a handler called stop_propagation, e.g. to open a custom menu) and cancel the native menu only in that case: app menus win where they exist, the browser menu everywhere else. Apps opening custom context menus should mark the triggering mousedown consumed to opt in. ## Testing Tested locally ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Showcase <img width="816" height="288" alt="context menu" src="https://github.com/user-attachments/assets/c79cd2ef-d465-4431-8461-7a9feb922576" /> Release Notes: - N/A |
||
|---|---|---|
| .. | ||
| examples/hello_web | ||
| src | ||
| Cargo.toml | ||
| LICENSE-APACHE | ||