You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discovered in #5812 (comment) and possibly a regression since #5973, it appears the library we use to add resize handles to the image blocks needs a little love.
Set the editor canvas to show at a >782px breakpoint (this is where the navigation bar on the left shows up)
Insert an image that's larger than the editor canvas.
Resize the viewport and note that the image doesn't size with it, as it should
That's the buggy part.
It works, if your editor canvas is <782 breakpoint. I.e. if you repeat the steps above at the breakpoint where the left sidebar is hidden, then no inline styles are set, and the image behaves as it should.
Screenshots:
☝️That's at <782px, note no inline styles.
☝️That's at >782px, note the inline style.
GIF:
CC: @youknowriad — I think you worked on image resizing, any idea what this might be a regression from, or how to best fix?
The text was updated successfully, but these errors were encountered:
As discovered in #5812 (comment) and possibly a regression since #5973, it appears the library we use to add resize handles to the image blocks needs a little love.
The issue is that the inline styles that a resized image receives here: https://github.com/WordPress/gutenberg/blob/master/blocks/library/image/block.js#L253 — they get applied when they shouldn't be. That means if you resize the viewport, the image doesn't resize with it, as the dimensions are explicitly set as inline styles.
Steps to reproduce:
That's the buggy part.
It works, if your editor canvas is <782 breakpoint. I.e. if you repeat the steps above at the breakpoint where the left sidebar is hidden, then no inline styles are set, and the image behaves as it should.
Screenshots:
☝️That's at <782px, note no inline styles.
☝️That's at >782px, note the inline style.
GIF:
CC: @youknowriad — I think you worked on image resizing, any idea what this might be a regression from, or how to best fix?
The text was updated successfully, but these errors were encountered: