Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#23461 closed defect (bug) (duplicate)

Tiny MCE adds line-height style when using the ordered or unordered list button

Reported by: eurello Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:


To reproduce:

  1. Open the Visual Editor
  2. Click the ordered list button, or unordered list button
  3. Add a list
  4. Click to the HTML Editor
  5. You'll see that span style="line-height: 13px;" has been added to the first list entry

This does not happen if you write the list, highlight your text, and then click either button. It is only when you click the button before typing.

Reported by a WordPress.com user. I can reproduce in several different themes, and macmanx reproduced on his site here, using 3.5.1: http://delta.jhuff.me/2013/02/12/list-test/

Change History (9)

comment:1 @macmanx3 years ago

  • Cc james@… added
  • Version set to 3.5.1

comment:2 @ev3rywh3re3 years ago

  • Cc jess@… added

I can confirm something similar reported by one of my users using Chrome 24.something on Windows. Although I haven't been able to reproduce this yet on any of my test systems. It leaves something like:

<li><span style="font-size: 13px; line-height: 13px;">stuff</span></li>

comment:3 @nacin3 years ago

Reproducible in: 3.5? 3.4.x?

comment:4 @ev3rywh3re3 years ago

Had time to dig into this a little better. I was able to fire up my WinXP VM since it needed some updates anyway and I updated a couple of test/mirror sites.

I can reproduce on WP 3.5.1 (multisite sub-directory mode) with recent Chrome release. For this test site all plugins are inactive. No problems on a standard WP 3.5.1 install on the same system.

comment:5 @macmanx3 years ago

I was able to reproduce it in Safari under a single (non-multisite) WP 3.5.1 installation with no plugins active using Twenty Twelve: http://delta.jhuff.me/2013/02/12/list-test/

I haven't had a chance to get an older copy of WP up, but will leave a comment here when I do, unless someone else gets to it first.

This is also reproducible on WordPress.com.

comment:6 @azaozz3 years ago

Confirmed in Chrome 24.0.1312.57 Win7.

This is a long standing bug in WebKit: in contenteditable mode it adds spans with the browser calculated styling (browser cruft), lots of them. TinyMCE tries to remove all but it seems the latest Chrome/Safari found a way to still add some...

The actual styles depend on the theme used and come from editor-style.css. In Twenty Ten it only adds <span style="line-height: 16px;">...</span>. Without editor-style.css it adds <span style="line-height: 13px;">...</span> which comes from the default stylesheet.

Unfortunately we can't do much about it short of filing Chrome bug report, this has to be fixed upstream.

Last edited 3 years ago by azaozz (previous) (diff)

comment:7 @azaozz3 years ago

  • Cc spocke added

comment:8 @SergeyBiryukov3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #17154.

comment:9 @SergeyBiryukov3 years ago

  • Version 3.5.1 deleted
Note: See TracTickets for help on using tickets.