Skip to content

Fix clipboard paste in Emscripten text inputs - #204

Merged
treeform merged 1 commit into
masterfrom
fix-emscripten-paste
Oct 30, 2026
Merged

treeform merged 1 commit into
masterfrom
fix-emscripten-paste

Conversation

@treeform

Copy link
Copy Markdown
Owner

Pasting into a Silky text field in a browser currently throws getClipboardString is not supported on emscripten. Let Cmd/Ctrl+V reach the browser's paste event, cache its UTF-8 text, then deliver one editor paste shortcut with the modifier state restored afterward. No asynchronous clipboard-read permission is needed.

getClipboardString() and clipboardContent() return the latest pasted text, not an unrestricted system clipboard read. Copy/cut support is unchanged. The manual input demo now displays pasted text.

Validation: native and Emscripten nim check for tests/manual_inputs.nim; full GotA WASM build; browser verification that a pasted server URL appears exactly once without crashing and a single undo restores the previous address.

@treeform
treeform merged commit 891e08f into master Oct 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant