#31253 closed defect (bug) (fixed)
Images should be forced to fit inside the editor
Reported by: | iseulde | Owned by: | iseulde |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
I think it would be best if images and captions have a max-width: 100%;
.
This appeared to be a bit of a problem on iOS... Another bug, again.
Inside iframes, Safari on iOS doesn't obey max-width
if a width
is set on the element. It does work if a width attribute is used though. The only solution seems to be overwriting with width: auto;
.
Related:
Attachments (4)
Change History (13)
This ticket was mentioned in Slack in #core by drew. View the logs.
10 years ago
#5
@
10 years ago
- Owner set to azaozz
- Status changed from new to reviewing
As I recall, the Press This folks ran into the same issue with media overflowing the editor viewport. If we could, I'd like get insight from @azaozz on how they decided to handle that.
I think the issue is partially that $content_width
defines the width as part of or in conjunction with themes' editor stylesheets, so would artificially constraining media to visible in the editor viewport mess too much with that?
#6
@
10 years ago
I think the issue is partially that $content_width defines the width as part of or in conjunction with themes' editor stylesheets, so would artificially constraining media to visible in the editor viewport mess too much with that?
No, width 100% obeys the width of the body.
An argument against doing this is that the theme might not set this on the front end and surprise the user. I still think we should do this because
1) most themes do force the image to fit on the front end and forget to do this in the editor (even our default themes before [31849]),
2) it's a really bad writing experience,
3) the theme does not need to provide any styles, so the defaults should be good, and
4) the editor can be used for things other than the post content.
#7
@
10 years ago
- Milestone changed from 4.2 to Future Release
- Owner azaozz deleted
I don't think there's enough of a justification to make this kind of change at this point in the cycle. I think we need to fall back and get more discussion on the expected behavior here before we can really talk about implementing such a change. Punting.
Forgot
height: auto;
:)The only (minor) issue here is that some themes add a margin to images inside captions, so the image might overflow the caption area. Themes should add padding to the parent element instead. We should adjust our bundled themes.