Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51314 closed defect (bug) (reported-upstream)

Pasting into the title field from a spreadsheet cell causes new table block to be created

Reported by: bhkh's profile bhkh Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5.1
Component: Editor Keywords:
Focuses: Cc:


How to recreate

  1. Add new page
  2. from spreadsheet (external program like libre office) copy the contents of a cell that is to become the page title
  3. Paste (using ctrl-v or ctrl-shift-v) into the page title field on the new page

Expected Result: text of the copied cell would become the title of the page.

Actual Result: Instead of pasting the text of the cell (as it had done prior to 5.5) it skips away from the title title field and instead creates a one cell "table" block on the body of the page. Title field remains empty.

I'm absolutely sure this started with 5.5. My process to create posts always takes the title from a spreadsheet cell.
I have tried with all plugins disabled on TwentyTwenty.
I posted about this issue here and someone else was able to recreate:

Change History (6)

#1 @sabernhardt
4 years ago

  • Component changed from General to Editor

Hi @bhkh and thanks for the report!

I can confirm that the behavior has changed since 5.4. With WordPress 5.4.2, using Ctrl-V to paste a cell from an Excel spreadsheet into the title block pastes the contents of the cell without formatting into the title. Now it creates the separate table block in 5.5.1.

#2 follow-up: @sabernhardt
4 years ago

It seems to be related to this change:

Also, I can use Ctrl-Shift-V to paste as plain text within a paragraph block, but it does not paste at all for me in the title block.

#3 in reply to: ↑ 2 @bhkh
4 years ago

Replying to sabernhardt:

It seems to be related to this change:

Oh, that's interesting. That kind of functionality seems like it is just asking for trouble. Why would someone paste a whole document into the title field? Any way, thanks for looking into this!! My first bug report.

#4 @bhkh
4 years ago

It's not directly related to this bug, but it seems like Gutenberg is trying extra hard to guess what it is that we want. I just noticed that it is impossible to paste a block of pure text that begins with a number into a paragraph bloc without it turning into a numbered list.

#5 @sabernhardt
4 years ago

For the number formatting, "1 is the loneliest number" should remain as plain text within a paragraph or heading block. However, adding a period and space for "1. first step" is a popular Markdown shortcut to turn that text into an ordered list.

#6 @sabernhardt
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

I moved this report to GitHub so the Editor team can handle it there.

If you have anything to add, please comment on that issue.

Note: See TracTickets for help on using tickets.