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: Pasting into an empty quote node converts it to a paragraph #5108

Closed
kevinansfield opened this issue Oct 10, 2023 · 3 comments · Fixed by #6367
Closed

Bug: Pasting into an empty quote node converts it to a paragraph #5108

kevinansfield opened this issue Oct 10, 2023 · 3 comments · Fixed by #6367
Assignees
Labels
core Reconciler, DOM, Selection, Node, Events, Composition

Comments

@kevinansfield
Copy link
Collaborator

Lexical version: v0.12.2

Steps To Reproduce

  1. Open https://playground.lexical.dev
  2. Copy some text from elsewhere in the playground editor contents
  3. Start a new quote using either > or the menu
  4. Paste your copied text

The current behavior

The quote formatting is lost and replaced with a plain paragraph.

quote-lost.mp4

The expected behavior

The quote formatting is kept when pasting.

@funbinhe1996 funbinhe1996 added the core Reconciler, DOM, Selection, Node, Events, Composition label Oct 12, 2023
@funbinhe1996 funbinhe1996 self-assigned this Oct 14, 2023
@grigoriy-reshetniak
Copy link

This issue is not reproducible in 0.16.0

quote_copy_paste-2024-06-07_12.28.44.mp4

@kevinansfield
Copy link
Collaborator Author

Confirmed, this looks to be fixed 🙏

Closing for now, if we detect other issues after upgrading I'll re-open/open a new issue.

@kevinansfield
Copy link
Collaborator Author

On further testing this only appears to have been fixed when a copy results in the clipboard only containing text nodes. If a whole paragraph node is copied then a paste into a quote still clears the quote which feels unexpected.

I've worked around that in our editor here https://github.com/TryGhost/Koenig/pull/1297/files but I'm re-opening the issue as it still feels like a core concern. However, please feel free to close if this expected behaviour crosses the core/userspace concern boundary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Reconciler, DOM, Selection, Node, Events, Composition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants