Skip to content

fix(client): keep status tooltip popper away from viewport edge - #370

Open
Oppenheymu wants to merge 1 commit into
koishijs:mainfrom
Oppenheymu:fix/status-tooltip-scrollbar
Open

Oppenheymu wants to merge 1 commit into
koishijs:mainfrom
Oppenheymu:fix/status-tooltip-scrollbar

Conversation

@Oppenheymu

Copy link
Copy Markdown
Contributor

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。

@Oppenheymu Oppenheymu closed this Oct 8, 2026
@Oppenheymu Oppenheymu reopened this Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: 鼠标悬停于页面右下角时,出现反复闪烁的滚动条

1 participant