Repository navigation
fix: Scrolling along edges breaks text editing - #135
Merged
Merged
Conversation
Existing Gutenberg `preventFocusCapture` logic relies upon `pointerdown` and `pointerup` events for temporarily disabling all text blocks `contenteditable` status. This is down to mitigate issues with block selection for `flex` elements. However, `pointerup` events are not always triggered on touch devices when a touch turns into a swipe. When you scroll with your finger outside of the block canvas, the `pointerup` callback is never invoked. Scrolling twice or more leads to a stale `value` in the callback, and a state where `contenteditable` is perpetually disabled.
nbradbury
approved these changes
May 19, 2025
nbradbury
left a comment
Contributor
There was a problem hiding this comment.
Fix is good! I was able to reproduce the problem in trunk but not with this branch ![]()
jkmassel
added a commit
that referenced
this pull request
Aug 12, 2026
…ories Resolves 29 Dependabot advisories in the dev dependency tree. None of these packages ship in the iOS/Android app bundle -- they are build, lint, and local-WP (`@wordpress/env`) tooling. In-range bumps: - `vite` 8.0.5 -> 8.2.1 (direct devDep; floor raised to `^8.0.16`) #134 #135 - `shell-quote` -> 1.10.0 (critical #133) #165 - `fast-uri` -> 3.1.5 #163 #164 #179 #206 #207 - `js-yaml` -> 3.15.1 / 4.3.1 #157 #158 #167 #168 #200 #201 - `brace-expansion` #160 #166, `immutable` #161 #162, `tmp` #131, `fast-xml-builder` #122 #123, `simple-git` #119, `@babel/plugin-transform-modules-systemjs` #126 Scoped `overrides` (parents exact-pinned the vulnerable version): - `ws` -> 8.21.0, keeping 7.5.13 for `react-devtools-core` #138 #153 - `qs` -> 6.15.2 under `@wordpress/env` #130 - `minimatch` -> 9.0.9 under `@typescript-eslint/typescript-estree` #65 - `@babel/core` -> 7.29.7 under `@wordpress/babel-preset-default` #154 Not addressed here: `electron` (33 alerts) and its bundled `got` (#33) are pinned by `react-devtools@7.0.1` -- already the latest, and npm's only "fix" is a breaking downgrade to `react-devtools@1.0.5`. Runtime-scope advisories (`seroval`, `nanoid`, `postcss`, `showdown`, `uuid`) are out of scope for a dev-only bump. Verified: `npm run test:unit` (202 passing) and `npm run build` green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fix perpetually disabled text blocks after scrolling the editor by swiping
outside of the block canvas container.
Why?
Fix CMM-356. The inability to edit text is unexpected.
How?
Existing Gutenberg
preventFocusCapturelogic relies uponpointerdownand
pointerupevents for temporarily disabling all text blockscontenteditablestatus. This is done to mitigate issues with blockselection for
flexelements.However,
pointerupevents are not always triggered on touch deviceswhen a touch turns into a swipe. When you scroll with your finger
outside of the block canvas, the
pointerupcallback is never invoked.Scrolling twice or more leads to a stale
valuein the callback, and astate where
contenteditableis perpetually disabled.Testing Instructions
block canvas that contains the blocks.
Accessibility Testing Instructions
N/A, no navigation changes.
Screenshots or screencast
N/A, no visual changes.