diff --git a/patches/@wordpress+rich-text+7.22.0.patch b/patches/@wordpress+rich-text+7.22.0.patch new file mode 100644 index 000000000..8e2160111 --- /dev/null +++ b/patches/@wordpress+rich-text+7.22.0.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/@wordpress/rich-text/build-module/component/event-listeners/prevent-focus-capture.js b/node_modules/@wordpress/rich-text/build-module/component/event-listeners/prevent-focus-capture.js +index 3b885f5..c2ea3d0 100644 +--- a/node_modules/@wordpress/rich-text/build-module/component/event-listeners/prevent-focus-capture.js ++++ b/node_modules/@wordpress/rich-text/build-module/component/event-listeners/prevent-focus-capture.js +@@ -36,9 +36,11 @@ export function preventFocusCapture() { + } + defaultView.addEventListener('pointerdown', onPointerDown); + defaultView.addEventListener('pointerup', onPointerUp); ++ defaultView.addEventListener('pointercancel', onPointerUp); + return () => { + defaultView.removeEventListener('pointerdown', onPointerDown); + defaultView.removeEventListener('pointerup', onPointerUp); ++ defaultView.removeEventListener('pointercancel', onPointerUp); + }; + }; + } diff --git a/patches/README.md b/patches/README.md index 64130f636..39fde5f56 100644 --- a/patches/README.md +++ b/patches/README.md @@ -10,3 +10,7 @@ Existing patches should be described and justified here. - Expose an `open` prop on the `Inserter` component, allowing toggling the inserter visibility via the quick inserter's "Browse all" button. - Disable `stripExperimentalSettings` in the `BlockEditorProvider` component so that the Patterns and Media inserter tabs function. + +### `@wordpress/rich-text` + +- Fix `preventFocusCapture` causing uneditable text blocks on touch devices when scrolling by swiping outside of the block canvas--e.g., along the edge of the screen.