fix: Fixed the placeHolder of TreeSelect is blocked when the search b… #2566
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.
…ox is in trigger, single selection
中文模板 / Chinese Template
What kind of change does this PR introduce? (check at least one)
PR description
Fixes #
问题原因:
修复 #2292 时候,引入负值的 z-index 。负值的 z-index 会处于层叠上下文的下方,原来在 placeholder 层设置了 z-index 为 -1, 预期是想要实现
为什么在开发阶段没有发现这个问题?
有 cypress 测试用例覆盖,TreeSelect 的 search Position 用例,但由于 storybook 中背景没有设置颜色,因此即使负值的 z-index 位于层叠上下文的下方,仍然能够显示出来,而官网中,用例区域有背景色(-semi- color-bg-0),遮挡住了负值 z-index 的文本。因此两者的表现不同。
修复方式
去掉 placeholder 文本层的负值的 z-index,当 searchPosition 在 trigger中并且 focus 的状态下,设置 input 的wrapper 层的 z-index 为 1,保证此时 input 在文本上方
Changelog
🇨🇳 Chinese
🇺🇸 English
Checklist
Other
Additional information