Repository navigation
fix(client): keep status tooltip popper away from viewport edge - #370
Open
Oppenheymu wants to merge 1 commit into
Open
Oppenheymu wants to merge 1 commit into
Oppenheymu wants to merge 1 commit into
Conversation
This branch has not been 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.
Fixes #369
问题
底部状态栏「CPU/内存」等状态项的悬停 tooltip 经
el-tooltip placement="top"弹出,popper 挂载在 body 下。Element Plus popper 默认 modifiers 中preventOverflow的 padding 四个方向均为 0,弹层因此被修正到与视口右缘零间距的位置。在经典滚动条 + DPI 缩放环境下,该贴边定位经亚像素取整后向右溢出零点几像素,触发如下循环:body 撑出横向滚动条 → 视口有效高度减小 → footer(
position: fixed; bottom: 0)上移 → 鼠标脱离状态项触发mouseleave→ tooltip 关闭 → 滚动条收回 → footer 复位 → 鼠标重新命中 → tooltip 重开 → 循环闪烁。修复
给
preventOverflow留出 8px 安全边距(popper-options一处声明),弹层不再贴死视口边缘,循环无从触发。这是通用修复,作用于所有经k-status容器渲染的状态项 tooltip。详细实测数据见 #369。