Repository navigation
fix: disable editableRoot for Paragraph and List Item blocks - #821
Conversation
Selecting either block makes the writing flow wrapper an editing host that takes focus, which breaks iOS caret placement, typing, and caret scrolling. Keep the patch until upstream's iOS fix (gutenberg#81042) ships in a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/821")Built from d90ac7f |
Gutenberg#82816 reverted most of #81042, so its release does not fix the iOS caret issues; tie removal to an actual upstream fix instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EB2aXCE1bcZisf7iy9zTLs
|
Would the patch cause any trouble on Android, since it also revert the changes in the Android library? |
No, it should not. I noted no regressions in my own testing. The patch reverts Gutenberg behavior (specifically a portion of |
|
@dcalhoun According to Claude, this should fix the issue: WordPress/gutenberg#85483. The problem seems to be the tab stops and this editor not using the iframe |
|
@ellatrix thanks for the note. I followed up in WordPress/gutenberg#85483 (comment). @crazytonyli I believe we should still try to merge this to while we attempt to fix this upstream in Gutenberg. |
What?
Revert editable root changes from upstream Gutenberg core via a patch. Upstream is iterating on improving iOS text selection, the various PRs are listed in the details section collapsed at the bottom.
Why?
The iterations create severe instability in moving the caret between the title and content. Placing the cursor often fails, where the targeted title/block is "selected" by Gutenberg, but the caret is not within the actual field itself. This occurs most notably when moving between the title and content.
How?
Add patch to remove the
editableRootopt in. We should remove this patch once the problems are addressed upstream.Testing Instructions
Accessibility Testing Instructions
N/A, no navigation changes.
Screenshots or screencast
Recording exhibiting the bug before these changes:
gbk-caret-movement.mov
AI-generated details
Since c761edb (#735), tapping on iOS often fails to move or show the caret (most noticeably into the post title), typing doesn't reach the newly selected block, and the caret scrolls beneath the block toolbar.
Cause: gutenberg#81542 re-added the private
editableRootopt-in to the Paragraph block (block-library 11.1.0), and gutenberg#82816 added it to List Item (11.2.0). Selecting either block makes the writing flow wrappercontenteditable="true"and moves focus to it, so taps land inside one large editing host instead of focusing the tapped field.Fix: patch both opt-ins out, restoring the pre-#735 behavior. This gives up cross-block text selection on mobile web, which GBK didn't have before #735 anyway.
Gutenberg references
Merged:
editableRootblock support for native cross-block selection WordPress/gutenberg#79105 addededitableRootfor native cross-block selection, and Make editableRoot a private block setting rather than a public support WordPress/gutenberg#80820 made it a private block setting.Open:
Testing: on iOS, tap between paragraphs, list items, and the post title. The caret should land where tapped, typing should go into the selected block, and the caret should stay visible above the toolbar.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EB2aXCE1bcZisf7iy9zTLs