Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#45580 closed defect (bug) (duplicate)

Twenty Seventeen: images in the Classic Block cannot be resized

Reported by: azaozz's profile azaozz Owned by: laurelfulford's profile laurelfulford
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

To reproduce:

  1. Start a new post.
  2. Insert a Classic Block.
  3. Insert an image.
  4. Attempt to resize it by dragging the corners.

The image "snaps back" to 100% width.

Seems that has been the case for a while (in the Classic Editor). Caused by width: inherit; from here:

.editor-styles-wrapper img {
    height: auto; /* Make sure images are scaled correctly. */
    width: inherit; /* Make images fill their parent's space. Solves IE8. */
    max-width: 100%; /* Adhere to container width. */
}

(which is imported from editor-style.css).

Attachments (3)

45580.patch (537 bytes) - added by subrataemfluence 6 years ago.
Proposed patch
45580-2.patch (540 bytes) - added by subrataemfluence 6 years ago.
Please ignore the previous patch
ie8.png (13.1 KB) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (11)

@subrataemfluence
6 years ago

Proposed patch

@subrataemfluence
6 years ago

Please ignore the previous patch

#1 @subrataemfluence
6 years ago

  • Keywords has-patch added

I have created a proposed patch using your suggestion.
With width: inherit; not included, I am able to resize the image.

Please see the screencast https://youtu.be/EB9yt_Ew-d8

#2 @laurelfulford
6 years ago

Thanks for spotting this, @azaozz, and for the fix, @subrataemfluence!

I've confirmed that this update does take care of the issue in the Classic Block and the TinyMCE editor.

The width: inherit; was originally a fix for an IE8 issue; from what I can see, TinyMCE stopped supporting IE8, and I can only see the text tab with no option to switch to visual when I test that browser in Browserstack. So these styles should no longer be needed at all in the editor, either. But just in case -- @azaozz, could you confirm that what I'm seeing for IE8 sounds right for the current support, in case I'm missing something? Thanks!

#3 @azaozz
6 years ago

fix for an IE8 issue...

Ah, both core and TinyMCE don't support IE < 11. Think we can just ignore that fix for inside the editor :)

@azaozz
6 years ago

#4 @azaozz
6 years ago

can only see the text tab with no option to switch to visual

Me too, emulating in IE11 (which as far as I remember is quite accurate, almost "native").

#5 @laurelfulford
6 years ago

  • Keywords commit added

Thank you for double-checking that, @azaozz! I thought you might just know off the top of your head, so I really appreciate the testing! :)

Based on that, I'd say this fix is ready to roll!

#6 @laurelfulford
6 years ago

  • Owner set to laurelfulford
  • Status changed from new to assigned

#7 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#8 @laurelfulford
6 years ago

  • Keywords commit removed
  • Milestone 5.0.2 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

I completely missed that this is a duplicate of an existing ticket, #39738. :facepalm:

Apologies! Closing this one in favour of that one.

Note: See TracTickets for help on using tickets.