Skip to content

Fix paste into Monaco find widget#137

Merged
alecdotdev merged 1 commit intoalecdotdev:masterfrom
wargoblin:fix/search-box-paste
May 7, 2026
Merged

Fix paste into Monaco find widget#137
alecdotdev merged 1 commit intoalecdotdev:masterfrom
wargoblin:fix/search-box-paste

Conversation

@wargoblin
Copy link
Copy Markdown
Contributor

Fixes #115.\n\n## Summary\n- Scope Markpad's custom Monaco copy shortcut to editor text focus.\n- Scope the custom paste command to editor text focus so Monaco's find widget keeps native clipboard handling.\n\n## Test plan\n- npm run check\n- cargo check\n- cargo test\n- Internal review PR CI passed: https://github.com/wargoblin/Markpad/actions/runs/25441558927\n- Isolated Monaco smoke test: with find widget focused, custom paste/copy handlers do not run; with editor text focused, they still run.

Copilot AI review requested due to automatic review settings May 6, 2026 14:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Scopes Markpad’s custom Monaco clipboard keybindings (Ctrl/Cmd+C and Ctrl/Cmd+V) to only apply when the editor text area is focused, restoring native clipboard behavior for Monaco UI widgets like the Find widget (fixing #115).

Changes:

  • Restricts the custom copy action (custom-copy) to editorTextFocus so it won’t intercept copy in non-editor inputs (e.g., Find widget).
  • Restricts the custom paste command (Ctrl/Cmd+V) to editorTextFocus so pasting into the Find widget uses Monaco’s native handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wargoblin
Copy link
Copy Markdown
Contributor Author

Hi @alecdotdev, this PR fixes #115 by scoping Markpad's custom Monaco clipboard shortcuts to editor text focus, so the find widget keeps native copy/paste while editor paste behavior stays unchanged.\n\nPre-submit checklist:\n- Rebasing/preflight: one commit on top of current upstream/master; diff limited to src/lib/components/Editor.svelte.\n- Local checks: npm run check passed with 0 errors (existing 14 Svelte warnings unchanged); cargo check and cargo test passed (existing APP_NAME warning unchanged).\n- Review: internal Codex, Copilot, and Claude review completed with no actionable code comments; added isolated Monaco smoke tests for find-widget copy/paste and editor-focused copy/paste behavior.\n- GitHub Actions: upstream CI passed.\n\nReady to adjust if you prefer a narrower clipboard-scope policy.

@alecdotdev alecdotdev merged commit bcc7ea2 into alecdotdev:master May 7, 2026
4 of 5 checks passed
@alecdotdev
Copy link
Copy Markdown
Owner

great stuff, thanks!

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.

Can no longer paste into search box

3 participants