Project

General

Profile

Actions

Bug #63982

closed

RTE: Webkit may insert line-height style attribute on paste

Added by Philipp Kerling over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
2014-12-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When copying some elements (I don't know the exact conditions yet) that have a custom line-height set by CSS rules, htmlarea inserts unneeded and unwanted inline style attributes to elements.

Steps to reproduce:
  1. Add
    ul { line-height: 150%; color: red; }

    to the RTE.default.contentCSS file
  2. Insert a new text element
  3. Type a, ENTER, b
  4. Make sure the text is colored red, i.e. the contentCSS was correctly loaded
  5. Select all text with Ctrl+A
  6. Click the "Bulleted List" button in the toolbar
  7. Copy the text with Ctrl+C
  8. Go to the end of the text with END
  9. Type ENTER two times to generate a new paragraph
  10. Paste the text with Ctrl+V
  11. Look at the generated HTML source. It will be:
    <ul><li>a</li><li>b</li></ul><ul style="line-height: 27px; "><li>a</li><li>b</li></ul>

    The style="" is unnecessary.

It only happens in Webkit browsers (tested in epiphany). Happens every time.

Actions

Also available in: Atom PDF