From cf49b04023fe0b110f20ef90ca4f590f572672c3 Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Thu, 5 Nov 2026 01:25:51 +0100 Subject: [PATCH] docs(cli-rs): record the select right-click deviation TS DialogSelect chooses a row on any button's release; Rust takes the left button only (O-41). --- .../deviations/DLG35-select-right-click.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/cli-rs/parity/deviations/DLG35-select-right-click.md diff --git a/packages/cli-rs/parity/deviations/DLG35-select-right-click.md b/packages/cli-rs/parity/deviations/DLG35-select-right-click.md new file mode 100644 index 00000000000..527445434a6 --- /dev/null +++ b/packages/cli-rs/parity/deviations/DLG35-select-right-click.md @@ -0,0 +1,19 @@ +# DLG35: select rows ignore a right-click release + +## TypeScript + +Each `DialogSelect` row runs `option.onSelect` and `props.onSelect` from `onMouseUp` +(`packages/tui/src/ui/dialog-select.tsx:799-803`), whatever the button. OpenTUI Core delivers the release of any +button to `onMouseUp`, so releasing a right-click (or middle click) over a row chooses it. + +## Rust + +`Select::row_mouse` (`crates/ui/src/select.rs`) chooses a row only on `MouseEventKind::Up(MouseButton::Left)`. +Releasing any other button over a row does nothing. + +## Reason + +Choosing a row on a right-click release is a TypeScript bug: a right-click is not a request to choose, and it +can run an action the user did not ask for (O-41, `reviews/ms3-ms4.review-carbon.md` notes). The left-click path +is the same on both sides; `ui/tests/all/dialogs.rs::clicks_select_rows_and_the_backdrop_closes_the_dialog` +covers both buttons.