fix: enable right click to paste

This commit is contained in:
Austin Pickett 2026-04-20 08:47:46 -04:00
parent 42c30985c7
commit 3030a9fcf9
2 changed files with 17 additions and 0 deletions

View file

@ -671,6 +671,15 @@ export function TextInput({
setCur(next)
curRef.current = next
}}
onMouseDown={(e: { button: number }) => {
// Right-click to paste: route through the same hotkey path as
// Alt+V so the composer's clipboard RPC (text or image) handles it.
if (!focus || e.button !== 2) {
return
}
emitPaste({ cursor: curRef.current, hotkey: true, text: '', value: vRef.current })
}}
ref={boxRef}
>
<Text wrap="wrap">{rendered}</Text>