Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Copy command failing when selecting more than just the quill editor contents #4572

Open
conlanpatrek opened this issue Jan 17, 2025 · 2 comments · May be fixed by #4573
Open

Bug: Copy command failing when selecting more than just the quill editor contents #4572

conlanpatrek opened this issue Jan 17, 2025 · 2 comments · May be fixed by #4573

Comments

@conlanpatrek
Copy link

There's some strange copy / paste behavior happening with quill editors. If you highlight some content in a readonly editor and also include some content outside of the editor, copy commands fail.

Steps to reproduce

  1. Setup a readonly quill editor with some outer text content after.
  2. Put some content in the quill editor.
  3. Try to highlight both the content of the quill editor and the outer text content.

Expected

The highlighted text is copied

Actual

Nothing is copied, the clipboard remains in it's previous state.

Examples

Copy succeeds

Image
Image

Copy fails

Image

Reproduction

I've created a reproduction in the quill playground

@conlanpatrek
Copy link
Author

I see the issue, will submit a PR this evening.

@conlanpatrek conlanpatrek changed the title BUG: Copy command failing when selecting more than just the quill editor contents Bug: Copy command failing when selecting more than just the quill editor contents Jan 19, 2025
@conlanpatrek
Copy link
Author

@luin got a pretty simple bug, repro, and bugfix that's ready for you.

Right now I'm working around this by monkeypatching out the 'onCopyCapture' method on the clipboard module for read-only editors, but it's hacky and I'd love to remove it.

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 a pull request may close this issue.

1 participant