diff --git a/patches/@wordpress+block-library+9.22.0.patch b/patches/@wordpress+block-library+9.22.0.patch new file mode 100644 index 000000000..68f08b924 --- /dev/null +++ b/patches/@wordpress+block-library+9.22.0.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/@wordpress/block-library/build-module/image/image.js b/node_modules/@wordpress/block-library/build-module/image/image.js +index 473b653..8a52e9e 100644 +--- a/node_modules/@wordpress/block-library/build-module/image/image.js ++++ b/node_modules/@wordpress/block-library/build-module/image/image.js +@@ -282,7 +282,7 @@ export default function Image({ + const [hasImageErrored, setHasImageErrored] = useState(false); + const hasNonContentControls = blockEditingMode === 'default'; + const isContentOnlyMode = blockEditingMode === 'contentOnly'; +- const isResizable = allowResize && hasNonContentControls && !isWideAligned && isLargeViewport; ++ const isResizable = allowResize && hasNonContentControls && !isWideAligned; + const imageSizeOptions = imageSizes.filter(({ + slug + }) => image?.media_details?.sizes?.[slug]?.source_url).map(({ diff --git a/patches/README.md b/patches/README.md index 491d55dc0..bda3981dc 100644 --- a/patches/README.md +++ b/patches/README.md @@ -12,6 +12,10 @@ Existing patches should be described and justified here. - Disable `stripExperimentalSettings` in the `BlockEditorProvider` component so that the Patterns and Media inserter tabs function. - Allow setting popover props for the `Inserter` component, so we can improve the mobile screen reader experience by marking it as a modal dialog. +### `@wordpress/block-library` + +- Enable image resizing on mobile devices by removing the `isLargeViewport` check from the `isResizable` condition in the `Image` component. The resizing feature appears to work well enough now, in contrast to the description in https://github.com/WordPress/gutenberg/issues/2675. + ### `@wordpress/components` - Apply workaround to `FormFileUpload` to address iOS Safari's lack of support for a wildcard `audio/*` MIME type. Can be removed once [the issue](https://github.com/WordPress/gutenberg/issues/70119) is resolved in a future release.