WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#33022 closed defect (bug) (fixed)

TinyMCE: the more tag placeholder is not displayed properly

Reported by: azaozz Owned by: azaozz
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.2
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Happens when Twenty Thirteen | Fourteen | Fifteen is enabled. Caused by width: auto !important; for images in editor-style.css that was added in #31250, [31849].

Attachments (5)

more-tag.png (52.2 KB) - added by azaozz 2 months ago.
33022.diff (1.3 KB) - added by obenland 2 months ago.
33022.patch (1.4 KB) - added by iseulde 2 months ago.
caption-text-wrap.png (77.1 KB) - added by azaozz 2 months ago.
33022.2.patch (2.9 KB) - added by iseulde 2 months ago.

Download all attachments as: .zip

Change History (17)

@azaozz2 months ago

comment:1 follow-up: @azaozz2 months ago

  • Milestone changed from Awaiting Review to 4.3

Pinging @jacklenox: not sure why width: auto; has to be forced on all images and why this has to be !important.

Removing the !important bit fixes it (yeah, really hate the !important in css) :) Another possible fix is to add min-width to the image placeholders in the default editor css.

Another thing to keep in mind is that the editor runs in an iframe, and the @media screen and (max-width: 660px) applies to the iframe width, not the parent window width. So that media rule triggers most of the time, up to 1260px parent window width.

Last edited 2 months ago by azaozz (previous) (diff)

comment:2 in reply to: ↑ 1 @jacklenox2 months ago

Replying to azaozz:

Pinging @jacklenox: not sure why width: auto; has to be forced on all images and why this has to be !important.

I seem to recall that this depends on the settings of the image itself.

While removing !important will be ok for this more tag example, any large image which has been inserted via the media editor and has had an explicit width defined will break the editing experience for small screen users (where the screen is smaller than the image of course!).

Removing the !important bit fixes it (yeah, really hate the !important in css) :) Another possible fix is to add min-width to the image placeholders in the default editor css.

I'm not sure what this will fix, the problem is that some images are too large for the editor on small screens.

I didn't realise this had broken the more tag though so I'm sorry about this!

Maybe we need to create some sort of exception based on the class of the more tag placeholder image?

@obenland2 months ago

comment:3 @obenland2 months ago

  • Keywords has-patch added
  • Owner set to azaozz
  • Status changed from new to assigned

Would that fix it?

comment:4 @iseulde2 months ago

I also don't like seeing this in a theme. Maybe we should fix this in core?

comment:5 @slackbot2 months ago

This ticket was mentioned in Slack in #core by obenland. View the logs.

comment:6 @azaozz2 months ago

Lets add min-width in the default editor style for now. We're planning to add something similar by default, will revisit it then.

comment:7 @azaozz2 months ago

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

In 33351:

TinyMCE: add min-width to the placeholder images for the more and nextpage tags to fix them in themes that force width = auto.
Fixes #33022.

comment:8 follow-up: @iseulde2 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The important seems to be unnecessary in [31849].

Last edited 2 months ago by iseulde (previous) (diff)

@iseulde2 months ago

comment:9 in reply to: ↑ 8 @azaozz2 months ago

The important seems to be unnecessary...

It also breaks captions text wrapping and ability to align them in the center.

@azaozz2 months ago

@iseulde2 months ago

comment:10 @slackbot2 months ago

This ticket was mentioned in Slack in #core-editor by azaozz. View the logs.

comment:11 @iseulde2 months ago

In 33418:

Revert [31849] and [33351]

Also set the max-width of images in themes to 100%, not in pixels.

See #33022 and #31250.

comment:12 @iseulde2 months ago

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