Skip to content

fix: unify organization settings modal scrolling - #2508

Merged
lyingbug merged 1 commit into
Tencent:mainfrom
ttommybot:fix/organization-settings-scroll
Aug 3, 2026
Merged

fix: unify organization settings modal scrolling#2508
lyingbug merged 1 commit into
Tencent:mainfrom
ttommybot:fix/organization-settings-scroll

Conversation

@ttommybot

Copy link
Copy Markdown
Contributor

Description

修复共享空间设置弹窗中的嵌套滚动和滚动位置残留问题。

问题表现

成员较多时,成员名单和空间设置内容区域存在不同的滚动区域。切换到“成员管理”等栏目后,可能沿用上一个栏目的滚动位置,导致部分成员没有出现在当前可见区域,容易误以为成员缺失。

滚动到弹窗边界后,滚轮事件还可能继续影响弹窗后面的页面。

根因

  • 成员名单存在独立的滚动区域,和空间设置外层滚动区域相互嵌套。
  • 打开空间设置以及切换栏目时,没有重置外层内容区域的滚动位置。
  • 弹窗打开期间没有完整阻止背景页面滚动和滚动链穿透。

修改内容

  • 取消成员名单自身的滚动区域,统一使用空间设置外层滚动条。
  • 打开空间设置时自动将内容区域滚动到顶部。
  • 切换“基本信息”“成员管理”等栏目时自动回到顶部。
  • 弹窗打开期间锁定背景页面滚动。
  • 阻止滚动从弹窗内容区域继续穿透到背景页面。
  • 弹窗关闭或组件卸载时恢复页面原来的滚动状态。
  • 增加滚动区域、自动回顶和背景滚动锁定的回归测试。

用户影响

成员数量较多时,用户可以沿同一条外层滚动条查看完整成员名单。切换设置栏目后会从顶部开始展示内容,滚动也不会影响弹窗后面的页面。

Breaking Changes

无。

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

N/A

Testing

在 Podman Linux Node.js 环境中执行:

  • node --test src/views/organization/OrganizationSettingsModal.test.mjs
    • 3 个测试全部通过。
  • vue-tsc --build --pretty false
    • 类型检查通过。
  • git diff --check
    • 通过。

Checklist

  • make fmt && make lint && make test pass locally
  • Self-reviewed the code
  • Added/updated tests covering the change
  • Updated related documentation (N/A — no documentation changes required)
  • Breaking changes are clearly called out in the description above

@lyingbug
lyingbug merged commit 91b2d31 into Tencent:main Aug 3, 2026
2 checks passed
@ttommybot
ttommybot deleted the fix/organization-settings-scroll branch August 4, 2026 01:04
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.

2 participants