Repository navigation
Conversation
The canvas stops span the canvas with pointer-events: none. iOS places the caret at a tap ignoring pointer-events, so in a canvas without an iframe a tap into the post title landed in a stop and typing was lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. 📦 Bundle sizeSize Change: +14 B (0%) Total Size: 9.07 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Custom Completer: should allow newlines after multiple option completions in
|
This branch has not been deployed
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?
See wordpress-mobile/GutenbergKit#821
Makes the two canvas stops (the "Editor canvas" focus elements before and after the canvas) unselectable, so iOS can't place the caret in them.
Why?
In a canvas without an iframe, like GutenbergKit's, tapping the post title while a paragraph is selected on iOS shows the caret in the title, but typed text goes nowhere.
The canvas stops span the whole canvas with
pointer-events: none(#82354). While a paragraph is selected the canvas is the editing host, so the tap moves focus from the canvas to the title. After that focus change, iOS places the caret at the tap point with a hit test that ignorespointer-events, finds the stop on top of the title, and the selection ends up outside any editable element.With an iframe the stops live in the parent document, outside the canvas document, so the post editor in wp-admin is not affected.
How?
Adds
user-select: none(and the-webkit-prefix Safari needs for inline styles) to the stops' shared style. Text selection skips them; they keep their size, focus behaviour and hint.Testing Instructions
On trunk, step 2 types nothing.
Testing Instructions for Keyboard
No change: the stops are still focusable with Tab, and Escape still parks focus on the stop with its hint.
Use of AI Tools
Investigated and written with Claude Code: reproduced in an iOS simulator running GutenbergKit's editor with an XCUITest that taps and types, traced the selection, and confirmed hiding the stops or making them unselectable fixes it. Not covered by a test here, since the iOS tests use the iframed post editor where the bug doesn't occur.
🤖 Generated with Claude Code