Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#14218 closed defect (bug) (fixed)

TinyMCE inserts font-size style attribute on webkit browsers (i.e. Chrome and Safari) when browser is not at default zoom

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

Description

If you use the "visual" editing mode on a blog post in a Webkit-based browser, such as Google Chrome or Safari, and if you have your zoom level not at default, e.g. if you zoom out a notch or two from the browser's view menu, TinyMCE will insert style rules around certain blocks of text that specify a fixed font-size.

These would be the steps to reproduce the bug:

  1. Open an edit or new post window from Google Chrome or Safari (for Mac).
  1. Ensure the browser is zoomed out (i.e. everything should be smaller) a notch or two.
  1. Set one of the paragraphs of text to be e.g. an unordered list.
  1. Flip over to the HTML mode. You should see that in addition to wrapping the text with <li>, tinymce has also added something like <span style="font-size: 13.333px">...</span> around the text.

I have reproduced this error on both Google Chrome and Safari for Mac. I am not able to replicate this bug in Firefox. I have not tested it on other browsers or platforms. I have shown it to other people and they have been able to reproduce it as well, so please let me know if you cannot reproduce it.

An editor at one of the publications I develop for was baffled by this behavior for several weeks until we figured it out. Not sure if this can be addressed via the Wordpress codebase directly (since I believe it's probably a TinyMCE issue) but perhaps the behavior can be managed via a config setting)?

Change History (12)

#1 @azaozz
14 years ago

  • Milestone changed from Awaiting Review to 3.1
  • Owner set to azaozz
  • Status changed from new to assigned

This is actually caused by WebKit (seen it in Safari before on both Mac and Windows). It adds tons styles even where they don't belong, in the contentEditable iframe.

Could you confirm that this is still happening in the latest version of TinyMCE http://tinymce.moxiecode.com/examples/full.php and if yes, please submit a bug on their bug tracker as well.

#2 @nacin
14 years ago

Closed #14925 and #14535 as duplicates.

#3 @hakre
13 years ago

Related: #14537

#4 @jane
13 years ago

  • Keywords needs-patch added

This bug was still happening to me today in Chrome.

#6 @demetris
13 years ago

  • Cc dkikizas@… added
  • Keywords needs-patch removed
  • Resolution set to fixed
  • Status changed from assigned to closed

@jane, @ocean90:

Do you still see this? It seems to me it has been fixed in TinyMCE 3.3.

I can reproduce it in revisions before we updated to TinyMCE 3.3 (r15683), but I cannot reproduce it in current trunk with either Chrome or Safari.

Closing as fixed tentatively.

#7 @thomask
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 3.0 to 3.1

This is not yet fixed. Even with the latest Wordpress and Chrome, if you in wysiwig editor create UL, type something in its LI, end UL and then start to type normal paragraph, it starts with

<span style="font-size: small;"><span style="line-height: 24px;">

#8 @kawauso
13 years ago

  • Version changed from 3.1 to 3.0

#9 @ocean90
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Please open a new ticket. The orginal problem is fixed with 3.1.

Btw: I can't reproduce your problem with 3.1 and trunk, so if you create a new ticket, please add also the steps how to reproduce the issue and check if you can reproduce it with trunk.

#10 @thomask
13 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 3.0 to 3.1

it was not fixed in 3.1, it is still there. But it stays even with bleeding 3.2. But ok, i have created new ticket #17155. But IMO it should be solved even on this 3.1, because for me it is a tinymce blocker - it adds font-style:small to first P after UL, so the design is then broken. So i again reopen it for this 3.1, if you disagree or want to mark as duplicate with the new #17155 than close it again

#12 @ocean90
13 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.