Repository navigation
Conversation
Simplify completion scheduling and cancellation into a single lifecycle. Keep multiline previews in a non-editable inline container, hide them during composition, and remove them only after native input has settled. Validate request context before showing suggestions and preserve normal acceptance, undo, blur, and detach behavior. Add native preedit replacement and preview lifecycle regressions.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👍 @ilimei |
commit: |
Flush pending user updates before discrete preview insertion so the preview tag cannot mask input invalidation. Cover both response/input orderings, repeated text normalization, and delayed Safari composition commits. Document transient HTML layout and legacy block-node compatibility.
This branch was successfully 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.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
自动补全预览原先通过正式 Markdown 插入流程修改正文,并由多个监听器清理节点和恢复选区,容易干扰中文输入法的组词与上屏过程。本次重写补全生命周期,针对组词卡顿、拼音残留及预览清理问题收紧文档更新边界。
使用单一更新监听器和明确的状态流程管理请求、预览、取消与接受;请求返回时核对光标和正文上下文,丢弃过期结果。
将多段预览放在一个不可编辑的行内容器中,保留灰字、换行和撑开正文的 UI,取消时不拆分原正文段落。
预览插入前先提交待处理的用户更新,再使用独立的预览事务,避免
PREVIEW_TAG随合批更新跳过用户输入的失效判断。原生组词开始时用
display: none隐藏预览;等待上屏事件及 Lexical 更新完成后清理,不恢复旧选区。保留现有 API,覆盖 Tab 接受、撤销、失焦取消与卸载重挂载清理。
简化 Playground 示例:移除顶部固定工具栏,并局部覆盖编辑区域的全局焦点边框;已在浏览器中验证聚焦效果。
📝 补充信息 | Additional Information
验证:
a→啊、两种请求返回/用户输入合批顺序、连续取消后的文本归一化、Safari 延迟insertFromComposition、预览生命周期及 Markdown 插入回归。自动化 DOM 事件测试不等同于所有原生输入法实现的兼容性验收。
实现边界:多段预览使用瞬态行内包装器承载块 DOM,不将其
innerHTML作为可移植 HTML;接受时重新解析 Markdown。旧PlaceholderBlock节点和主题选项为反序列化兼容保留。