Repository navigation
输入翻译圆点打字期间不做镜像测量,停手 140ms(与逐段按钮悬停意图同一个常量)后对齐一次到新的末尾(#670) - #703
Merged
Merged
Conversation
Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
Co-Authored-By: zhexuancai-uts <261878103+zhexuancai-uts@users.noreply.github.com>
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.
问题
#665 让多行文本框里的圆点贴文字末尾,但每次输入都重新做一次镜像测量。镜像测量会强制同步布局,挂在每次按键上必然影响打字手感。打字时圆点在哪儿没人看,打字卡顿却是立刻能感觉到的(ADR-0006)。
根因
圆点的
sync()不分是聚焦、滚动还是打字引起的,一律当场调用place()。在多行文本框里,place()就是一次镜像测量。修复
input事件,以及 输入翻译:contenteditable 的写回,编辑器状态与界面一致(#633) #656 的编辑宿主 DOM 变动)不再测量,只负责显示或隐藏;停手SHOW_DELAY后对齐一次SHOW_DELAY(140ms,由来见按钮的注释):改为导出,同一个常量,不另写数字验证
input的时刻pnpm test115 个文件 1423 条全绿;pnpm typecheck通过;pnpm build通过pnpm test:e2e:core91 过、2 跳过、1 不稳定:TC-E2E-95 是设置页站点规则,失败原因是启动浏览器上下文超时(setting up "context"),与本票无关,重试通过Closes #670