Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#34642 closed defect (bug) (fixed)

Pasting a block of text that was copied in Chrome may insert a trailing paragraph

Reported by: azaozz's profile azaozz Owned by: azaozz's profile azaozz
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:

Description

To reproduce:

  • Visit any website, triple-click to select one paragraph.
  • Paste in the Visual editor.
  • Inspect the element with the browser tools: there is an empty paragraph after the one you just pasted.

The same thing happens if copying from Chrome and pasting in Firefox or IE. Doesn't happen if copying from Firefox and pasting in Chrome.

Change History (2)

#1 @azaozz
10 years ago

Happens when copying from all WebKit based browsers. Caused by the browser appending a <br class="Apple-interchange-newline"> to the clipboard.

This behaviour is not new. TinyMCE removes these br tags but only when running the "word filtering". Seems these have to be removed in all cases.

#2 @azaozz
10 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 35597:

TinyMCE: always remove trailing <br> added by WebKit browsers to the clipboard.

Fixes #34642.

Note: See TracTickets for help on using tickets.