[PR #13351] fix(app): preserve undo history for plain-text paste #14624

Closed
opened 2026-02-16 18:19:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13351

State: closed
Merged: Yes


What does this PR do?

Fixes #13350

In the desktop prompt input, plain-text paste was inserted via manual DOM mutation, which bypassed Chromium's native undo transaction. This updates only the plain-text paste branch to use native text insertion (execCommand("insertText")) with the existing fallback path.

How did you verify your code works?

After change, Ctrl+Z undoes pasted plain text as one atomic edit and image paste still creates attachments

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13351 **State:** closed **Merged:** Yes --- ### What does this PR do? Fixes #13350 In the desktop prompt input, plain-text paste was inserted via manual DOM mutation, which bypassed Chromium's native undo transaction. This updates only the plain-text paste branch to use native text insertion (`execCommand("insertText")`) with the existing fallback path. ### How did you verify your code works? After change, Ctrl+Z undoes pasted plain text as one atomic edit and image paste still creates attachments
yindo added the pull-request label 2026-02-16 18:19:24 -05:00
yindo closed this issue 2026-02-16 18:19:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14624