WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 10 months ago

#23356 new defect (bug)

Editor's text color button indicated different text color then the one use in several cases

Reported by: mark-k Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.4
Component: TinyMCE Keywords: close
Focuses: Cc:

Description

  1. Select a text color - the underline in the button will be displayed in that color
  2. write some text with this color
  3. start a new paragraph
  4. button color remain the same but the text is in the theme's default color

Same when moving to different section of the document, the button do not pick the right color used in the text and stays in its last setting.

Change History (3)

comment:1 @SergeyBiryukov2 years ago

  • Component changed from Editor to TinyMCE

comment:2 @mark-k2 years ago

found no documentation in the codex for the expected behaviour, but wordpress.com has something to say http://en.support.wordpress.com/visual-editor/#text-color

Selecting a color will apply that color to the selected text and make it the default color for the color button.

Clicking on the text color button itself will apply the last default color.

This is more inline with reality but still looks strange and not consistent with the way the other (bold and italics) buttons work, and it doesn't explain why the color is abandoned when you start a new paragraph.

comment:3 @iseulde10 months ago

  • Keywords close added

Yes, the button remembers the last selected colour so it can be applied easily to other selections. While I think it's a bit weird too, this has been the behaviour for years, so it's unlikely to change.

The plugin I recently made would adjust the colour of the button based on the selection, while it keeps the colour when you move the selection to an area that has no colour. Not sure if this behaviour is better.

Note: See TracTickets for help on using tickets.