element-plus icon indicating copy to clipboard operation
element-plus copied to clipboard

[Style] 所有弹窗都会为body添加.el-popup-parent--hidden类,其中overflow: hidden属性会导致窗口滚动条位置重置

Open Ketuer opened this issue 1 year ago • 1 comments

Bug Type: Style

Environment

  • Vue Version: 3.4.25
  • Element Plus Version: 2.7.2
  • Browser / OS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
  • Build Tool: Vite

Reproduction

Related Component

  • el-dialog
  • el-drawer
  • el-message-box

Reproduction Link

Link

Steps to reproduce

直接添加一个高度很大的盒子,扩展整个body高度,使浏览器出现滚动条,此时向下滚动一定位置,当打开抽屉或者出现弹窗时,页面直接跳到顶部,滚动高度被重置。

What is Expected?

不应该影响滚动高度

What is actually happening?

.el-popup-parent--hidden包含overflow: hidden样式导致滚动位置跳回顶部

Additional comments

(empty)

Ketuer avatar Apr 27 '24 16:04 Ketuer

请提供一个复现链接 以便我们定位问题 谢谢

FrontEndDog avatar Apr 28 '24 02:04 FrontEndDog

Since the issue was labeled with needs-more-info, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply. 由于该 issue 被标记为需要更多信息,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。

github-actions[bot] avatar May 01 '24 16:05 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。

github-actions[bot] avatar May 31 '24 16:05 github-actions[bot]