Files
webstudio/apps/builder/app/shared/copy-paste
Ivan Starkov b97c55e494 fix: broken copy paste when inputs or text selection were used before (#3894)
## Description

In some cases copy/paste didn't work

## Steps for reproduction

1. Focus on an input in the style panel (width, style source) or name
input in settings. Select the text, then copy and paste any instance in
the Navigator tree or on the Canvas.
2. Edit text in a paragraph on the Canvas. Select text (single or
multiple lines), then press Cmd+X. The paragraph should not be deleted.
3. Select CSS preview text, then select an instance in the Navigator.
Press Cmd+C, then Cmd+V.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-07 22:56:00 +03:00
..