fix(web): paste clipboard text into the TEXT / MText editors
Ctrl+V was globally bound to the entity paste command, so it never pasted into an open text editor, and even when routed there iced's clipboard read is a no-op on the web. Route Ctrl+V to the focused editor and, on the web, read the system clipboard via the browser's async Clipboard API (the keypress is a user gesture, so the read is permitted): - MText editor: insert at the caret (web + native). - TEXT field: append on the web; native lets the text_input paste itself. - No editor open: falls through to the entity paste command as before. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
54106ca9b0
commit
e1c5917644
5 changed files with 77 additions and 1 deletions
|
|
@ -1769,7 +1769,7 @@ impl OpenCADStudio {
|
|||
"y" => Some(Message::Redo),
|
||||
"c" => Some(Message::Command("COPYCLIP".to_string())),
|
||||
"x" => Some(Message::Command("CUTCLIP".to_string())),
|
||||
"v" => Some(Message::Command("PASTECLIP".to_string())),
|
||||
"v" => Some(Message::PasteShortcut),
|
||||
_ => None,
|
||||
},
|
||||
// Printable glyphs are already handled by the
|
||||
|
|
|
|||
Loading…
Reference in a new issue