Caret hidden behind the editor toolbar on iOS when editable root is enabled
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, javascript
调研方向
Start with the editableRoot handling and the FIXME in EditorViewController.swift, then reproduce the caret overlap in the iOS demo using the steps in the issue. The issue describes two possible approaches, but leaves the choice open and spans native WebView behavior and web-side scrolling. Done means the caret stays above the toolbar when the keyboard covers the tapped paragraph.
由索引模型根据 Issue 内容生成。
描述
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
- Revert the
editableRootKeyremoval inpatches/@wordpress+block-library+12.1.0.patchand runmake build. - In the iOS demo app, open the standalone editor and add eight two-line paragraphs.
- Swipe down to hide the keyboard.
- Tap a paragraph in the lower third of the screen.
- 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
- 主要语言
- JavaScript
- 星标
- 29
- 派生
- 6
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 76
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wordpress-mobile/GutenbergKit 的其他 Issue
-
[Type] Bug
难度 2/5 1-3 小时 新手友好度 74/100
wordpress-mobile/GutenbergKit#940 ·
维护者通常 1 天内回复
-
[Type] Bug
难度 2/5 1-3 小时 新手友好度 75/100
wordpress-mobile/GutenbergKit#884 ·
维护者通常 1 天内回复
-
[Type] Bug Android
难度 2/5 1-3 小时 新手友好度 79/100
wordpress-mobile/GutenbergKit#847 ·
维护者通常 1 天内回复
-
[Type] Bug iOS
难度 2/5 1-3 小时 新手友好度 77/100
wordpress-mobile/GutenbergKit#846 ·
维护者通常 1 天内回复
-
[Type] Bug [Type] Code Quality iOS
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/GutenbergKit#668 ·
维护者通常 1 天内回复
查看 wordpress-mobile/GutenbergKit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 13 天内回复
-
[BUG]: chunkSource protocol stripping truncates URLs or reads an inner scheme可能已有人在做 @Bensonbenyi 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
Mintplex-Labs/anything-llm#7338 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
bug: no-derived-state crashes on a call through a TypeScript import-equals alias (`import x = A.b`)未关闭bug
难度 2/5 1-3 小时 新手友好度 80/100
nickjvandyke/eslint-plugin-react-you-might-not-need-an-effect#90 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 85/100
semantic-release/semantic-release#4375 ·
维护者通常 1 天内回复