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

Cut & Paste only pastes first paragraph #80757

Closed
xpurichan opened this issue Aug 17, 2023 · 4 comments
Closed

Cut & Paste only pastes first paragraph #80757

xpurichan opened this issue Aug 17, 2023 · 4 comments
Labels
[Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Platform] Atomic [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@xpurichan
Copy link

xpurichan commented Aug 17, 2023

Quick summary

When we cut multiple paragraphs of text and then go to paste it, we are experiencing that only the first paragraph pastes within the WordPress editor. Adding that if we cut and paste in to another program then all paragraphs are pasted.

Using the undo arrow within the WordPress editor then either fails to restore the missing paragraphs (if the Gutenberg plugin is _de_activated), or causes the editor to fail with a "The editor has encountered an unexpected error." Error text copied below:

Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    at qr (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:75172)
    at $r (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:74857)
    at qr (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:75614)
    at $r (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:74857)
    at qr (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:75614)
    at $r (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:74857)
    at qr (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:75806)
    at $r (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:74857)
    at qr (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:75614)
    at $r (https://lillylearns.com/wp-content/plugins/gutenberg/build/vendors/react-dom.min.js?ver=18:1:74857)

Noting that in either case if we do not save the changes and refresh the editor then the missing text is then restored.

Steps to reproduce

Considerations
The issue has been observed on self-hosted sites and on Atomic with all plugins deactivated except for Jetpack (which was disconnected) and Akismet. I could not reproduce on a simple site. The behavior is sometimes inconsistent if you use keyboard shortcuts to cut & paste or have spotlight enabled, so focus on using right(command) click and having spotlight disabled.

A video recording of the issue:
https://www.loom.com/share/fdaef4278f6a4c969ca03fb328ede169?sid=18aa5b05-283a-47bd-9bd5-7d9adc7def0c

  1. On an Atomic or self-hosted site open the post or page editor
  2. Highlight the text across at least two blocks - testing was performed with two paragraph blocks
  3. Right-click and cut the text
  4. Right-click and paste the text
  5. Observe that only the first paragraph block was pasted back in to the editor, the second and subsequent blocks are now missing.
  6. Using the undo/back arrow within the editor either causes an unexpected error if Gutenberg is active, or simply fails to restore the missing text if Gutenberg is not activated.

What you expected to happen

Pasting text that has been cut should result in all text being restored.

What actually happened

Cutting and then pasting text only returns the first paragraph, subsequent paragraphs are not pasted.

Impact

All

Available workarounds?

Yes, mentioned above:

The behavior is sometimes inconsistent if you use keyboard shortcuts to cut & paste or have spotlight enabled

Platform (Simple and/or Atomic)

Atomic, Self-hosted

Logs or notes

No response

@xpurichan xpurichan added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Aug 17, 2023
@github-actions github-actions bot added [Platform] Atomic [Pri] High Address as soon as possible after BLOCKER issues [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Aug 17, 2023
@annezazu
Copy link

Noting that I have escalated this to the Gutenberg github repo after replicating with 6.3: WordPress/gutenberg#53774 We're looking at doing a 6.3.1 soon enough and hopefully a fix can be included there.

@liviopv
Copy link

liviopv commented Aug 17, 2023

Just documenting that this affects CUT only. COPY is working fine.

CleanShot.2023-08-17.at.17.16.57.mp4

And it only happens when using the mouse. Cmmd/Ctrl + X works fine.

@cuemarie cuemarie added [Pri] Normal Schedule for the next available opportuinity. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. and removed [Pri] High Address as soon as possible after BLOCKER issues [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Aug 17, 2023
@cuemarie
Copy link

📌 FINDINGS/SCREENSHOTS/VIDEO

📌 ACTIONS

  • Assigned to Other

@xpurichan
Copy link
Author

xpurichan commented Oct 19, 2023

This issue was resolved in WP 6.3.1 - WordPress/gutenberg#53774 (comment)

@cuemarie cuemarie added the [Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Resolved Issue is resolved. Use for issues that can be closed but did not have an explicit fix with a PR. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. Needs triage Ticket needs to be triaged [Platform] Atomic [Pri] Normal Schedule for the next available opportuinity. [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Core Fix Needed A fix within the Core WordPress or Gutenberg project is required to resolve this issue. [Type] Bug When a feature is broken and / or not performing as intended
Projects
Development

No branches or pull requests

4 participants