Skip to content

Crash on paste caused by Gutenberg #19097 #1688

@hypest

Description

@hypest

Describe the bug
WordPress/gutenberg#19097 introduced a regression where pasting rich-text in a paragraph causes a crash with: Cannot read property 'textAlign' of undefined at https://github.com/WordPress/gutenberg/blob/662c38e45c99f4d9232791d409bbce64fce4a0de/packages/block-library/src/paragraph/transforms.js#L26

Assumes WordPress/gutenberg#19190 being already merged first.

To Reproduce
Steps to reproduce the behavior:

  1. Start with initial-html.js having only this:
<!-- wp:paragraph -->
<p><strong>Hello</strong> paste</p>
<!-- /wp:paragraph -->
  1. Run the demo app
  2. Go into the paragraph, select all text and "Copy" it
  3. Add a new paragraph block from the Inserter and focus it
  4. Long-tap and paste
  5. 💥

Metadata

Metadata

Assignees

No one assigned

    Labels

    Web breakageCaused by incompatible changes on Gutenberg web[Type] Crash[Type] RegressionExisting functionality that got broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions