Skip to content

Caret hidden behind the editor toolbar on iOS when editable root is enabled #918

Open

Description

@dcalhoun

Description

This is a latent bug: it doesn't affect users today, because #821 patches the editableRoot opt-in out of the Paragraph, Heading and List Item blocks. It blocks removing that patch.

With the opt-in enabled, tapping a block that the keyboard will cover scrolls the caret to just above the web view's bottom edge, behind GBK's bottom toolbar. I expect the caret to land above the toolbar, as it does with the opt-in patched out.

WebKit's reveal logic (-[WKWebView _zoomToFocusRect:…]) places the caret 8pt above the visible edge when the focused element is taller than the visible area. With editable root, the focused element is the whole writing-flow wrapper. GBK's web view ends at the keyboard, and its toolbar is a fixed web element, so WebKit can't see it. scroll-padding-bottom doesn't affect this native reveal.

Setting obscuredContentInsets.bottom (iOS 26+) moves the caret above the toolbar. But it also shrinks the layout viewport, so the fixed toolbar moves up with it and doesn't paint inside the inset.

Possible fixes: a native toolbar outside the web view (see the FIXME in EditorViewController.swift), or scrolling the caret clear of the toolbar from the web side.

Step-by-step reproduction instructions

  1. Revert the editableRootKey removal in patches/@wordpress+block-library+12.1.0.patch and run make build.
  2. In the iOS demo app, open the standalone editor and add eight two-line paragraphs.
  3. Swipe down to hide the keyboard.
  4. Tap a paragraph in the lower third of the screen.
  5. The tapped line and caret sit behind the toolbar above the keyboard.

Screenshots, screen recording, code snippet

No response

Environment info

GutenbergKit trunk (0.20.0), iPhone 18 Pro simulator on iOS 27.2.

Please confirm that you have searched existing issues in the repo.

  • Yes

Activity

  1. added
    [Type] Bug
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions