Repository navigation
feat(input): 单行文本框的圆点贴文字末尾,横向滚动后随之更新,RTL 贴在左侧(#666) - #719
Merged
Merged
Conversation
镜像测量扩到单行文本框:不换行,竖直按内容区中线算,减去横向滚动(RTL 下为负值)。横向滚动的重算沿用已有时机(打字中等停手,#670),末尾滚出 框外时沿用 #669 的钳制。圆点旁置规则按书写方向区分:RTL 下末尾在左侧, 圆点放到文字左边;单行框里末尾那一侧放不下时放到光标另一侧。 镜像补上框所在的 lang:圆点宿主的 all: initial 连语言区域一并清掉,通用 字体族会解析成另一款字体,长文本的末尾差出几十像素。同一组端到端用例的 字宽真值也从画布改为文档里同一字体的 span,原因相同。TC-E2E-122 的回落 位置断言改为“整颗在框里”,位置真值交给 TC-E2E-138。 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.
问题
单行文本框与搜索框里的圆点还停在回落位置(框内侧右下角),和多行文本框(贴文字末尾)不一致。单行框文字一长就横向滚动,末尾的位置随滚动变化。
根因
镜像测量只接了多行文本框,单行框直接走回落位置。另外,镜像放在圆点自己的宿主里,宿主的
all: initial把从lang继承来的语言区域也清掉了。sans-serif这类通用字体族按语言区域解析成具体字体,于是镜像用另一款字体排版:短文本差一两像素看不出来,一句 60 个字符的英文差了 27px。修复
lang,多行文本框也一并受益。验证
#title,右内边距放大到 10px,让三种位置可区分):pnpm test:115 个文件、1424 条,全部通过。pnpm typecheck通过。pnpm test:e2e:core:95 条通过,2 条跳过。Closes #666