Repository navigation
Conversation
lnuxe
requested review from
anlyyao,
betavs,
jarmywang,
jin0209,
novlan1 and
zydemail
as code owners
November 13, 2026 07:50
lnuxe
force-pushed
the
fix/dialog-input-placeholder-offset
branch
from
November 17, 2026 02:04
5f867c2 to
fe8db3a
Compare
The popup enter animation keeps the dialog container inside a scale/translate composited layer. Native input placeholders complete their first layout against that intermediate transform state and end up vertically offset (issue Tencent#4551). Promote the dialog content and nested input to their own composited layer so the placeholder layout is computed from the settled geometry.
lnuxe
force-pushed
the
fix/dialog-input-placeholder-offset
branch
from
November 23, 2026 07:57
fe8db3a to
89140c2
Compare
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.
🤔 这个 PR 的性质是?
🔗 相关 Issue
Closes #4551
💡 需求背景和解决方案
问题:打开输入类对话框时(官方示例小程序「输入类-无描述/带描述」即可复现),弹窗进场动画期间
t-input内的文字/placeholder 出现竖向偏移,动画结束后部分机型不恢复。根因:
t-popup的 center 进场动画让对话框容器持续处于scale(0.6) translate3d(-50%,-50%)→scale(1) translate3d(...)的合成层变换中。原生input节点的 placeholder 在该中间态下完成首次布局,布局结果被变换中间态污染,产生竖向漂移;动画结束后部分渲染内核不重排。修复:在
dialog.less中把__content与内部t-input提升为独立合成层(transform: translateZ(0); backface-visibility: hidden),切断外层动画变换对 input 首次布局的干扰,placeholder 直接按最终几何布局。验证:
pnpm test:unit146 suites / 873 tests / 403 snapshots 全绿(与 develop 基线一致)prettier --check通过📝 更新日志
☑️ 请求合并前的自查清单