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
In the large viewport, the Image block cannot be resized if they are wide-aligned or full-width. I think this is the expected behavior, since if it's wide, it will be as wide as the theme defines, and if it's full width, it will span the full width of the canvas.
However, a small viewport width allows us to resize the image even if it is wide or full width. I think this is unintended behavior.
Whether the Image block can be resized is determined by the isResizable variable below:
t-hamano
changed the title
Image Block: Images can always be resized in the small viewport
Image Block: Can be resized in a small viewport even though the block is wide-aligned
Dec 13, 2023
Description
In the large viewport, the Image block cannot be resized if they are wide-aligned or full-width. I think this is the expected behavior, since if it's wide, it will be as wide as the theme defines, and if it's full width, it will span the full width of the canvas.
However, a small viewport width allows us to resize the image even if it is wide or full width. I think this is unintended behavior.
Whether the Image block can be resized is determined by the
isResizable
variable below:gutenberg/packages/block-library/src/image/image.js
Lines 196 to 199 in 9855f16
Please pay particular attention to the following parts of this conditional statement.
Originally, this conditional statement had the following format:
It appears that a conditional statement with the same meaning was originally added in #3344 to disable resizing on the small viewport.
I suspect that this conditional statement was changed unintentionally in #25940, when the gallery block was refactored (See diff).
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
a7c9b8945c64613177b49081c10348ac.mp4
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: