Opened 11 years ago

Last modified 11 years ago

#10359 confirmed Bug

[Webkit] Extra   and inline styles when copying and pasting aligned text

Reported by: Olek Nowodziński Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.0
Keywords: Webkit VendorFix Cc:

Description

Follow the cases below. Set initial data on the editor, then C-a, C-c, C-v and get data.

  • Tested in latest Chrome (26.0.1410.63), Webkit 537.31
  • Note that  s are displayed always regardless of the alignment.
  • Related ticket: #9998

replacebycode (extra &nbsp;, inline style on <a>)

Initial data:

<p style="text-align:right">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>

After copy and paste:

<p style="text-align:right">This is some&nbsp;<strong>sample&nbsp;text</strong>. You are using&nbsp;<a href="http://ckeditor.com/" style="text-align: right;">CKEditor</a>.</p>

outputhtml (extra &nbsp;)

Initial data:

<p align="right">This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>

After copy and paste:

<p align="right">This is some&nbsp;<b>sample text</b>. You are using&nbsp;<a href="http://ckeditor.com/">CKEditor</a>.</p>

Change History (2)

comment:1 Changed 11 years ago by Jakub Ś

Keywords: Webkit added
Version: 4.1.1 (GitHub - master)3.0

Problem can be reproduced from CKEditor 3.0. If you however do the same test in plain contenteditable div and inspect source you will notice that browser does this by default.

comment:2 Changed 11 years ago by Jakub Ś

Keywords: VendorFix added
Status: newconfirmed

I'm confirming this issue however I'm marking it as VendorFix as this is browser Problem/feature.

Like I said before:

  1. Open Page with contenteditable div and below code inside

{{{<p style="text-align:right">This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p> }}}

  1. Select it and copy/paste with Ctrl+c/Ctrl+v
  2. Inspect with WebTools.
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy