input: Let Textarea and Editor take a context menu builder (#2724)
## Description
`Input` has taken a `context_menu` builder for a while, and multi-line
callers
reached it through `Input::from_base`. #2716 removed that escape hatch
in favour
of `Textarea` and `Editor`, but those two forward only ten of `Input`'s
builders and this was not among them — so replacing the built-in
right-click
menu became unreachable for anything multi-line.
Forward it, on both:
```rust
Editor::new(&state).context_menu(|menu, window, cx| {
menu.menu(t!("Open docs"), Box::new(OpenDocs))
})
```
The other builders they leave out are deliberate: `cleanable`,
`mask_toggle`,
`prefix`, `suffix` and `content_type` are single-line affordances,
`focus_bordered` is fixed by `Editor`, and `h_full` already arrives
through
`Styled`.
Found while upgrading a downstream app to #2716, where a code editor
with a
per-language documentation menu had no way to keep it.
> AI-generated with Claude Code, reviewed and adjusted by hand.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> J
Jason Lee committed
be6f5a7d6fcd306f747c0bf47b1e3c17d2fbd014
Parent: c2505a0
Committed by GitHub <noreply@github.com>
on 8/15/2026, 6:17:12 AM