fix: macOS 下禁用橡皮筋回弹效果 避免列表滚动时滚动条占位导致布局抖动 - #4071
Closed
hjhke wants to merge 0 commit into
Closed
Conversation
Contributor
PR CI 汇总状态:全部通过
由 pull_request test workflow 自动生成 |
hubin4826
approved these changes
Jul 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 旨在在 macOS 下抑制页面的 overscroll 橡皮筋回弹,并通过调整滚动容器样式来减少列表滚动时滚动条占位带来的布局抖动(主要涉及入口全局样式开关与 HTTPHistory 左侧面板滚动行为调整)。
Changes:
- 在渲染端入口基于平台判断为 macOS 时,给
html增加macos-scroll-fixclass 以启用对应全局样式 - 新增
macos-scroll-fix相关 CSS:设置高度/overscroll-behavior,并在 macOS 下隐藏body的纵向滚动 - 调整
HTTPHistory左侧 tab 内容区与列表区的滚动/overscroll 行为(包括min-height: 0以修复 flex 子项滚动)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/renderer/src/main/src/utils/monacoSpec/yakCompletionHint.ts | 将 isMacPlatform 改为导出,供外部复用 |
| app/renderer/src/main/src/index.tsx | macOS 时注入 macos-scroll-fix class 以启用全局滚动修复 |
| app/renderer/src/main/src/index.css | 增加 macos-scroll-fix 的全局 overscroll/overflow 样式 |
| app/renderer/src/main/src/components/HTTPHistory.module.scss | 调整滚动容器的 overflow/overscroll,减少滚动冲突与抖动 |
Comment on lines
+23
to
+30
| import { isMacPlatform } from './utils/monacoSpec/yakCompletionHint' | ||
|
|
||
| const MONACO_WORKER_BASE = 'static/js/monaco' | ||
|
|
||
| // macOS 下禁用橡皮筋回弹效果(overscroll),避免与页面内滚动区域冲突造成卡顿 | ||
| if (isMacPlatform()) { | ||
| document.documentElement.classList.add('macos-scroll-fix') | ||
| } |
hjhke
force-pushed
the
hejiahui/fix/mac_overflow
branch
from
July 31, 2026 09:17
d18361f to
b9c2a6f
Compare
hjhke
force-pushed
the
hejiahui/fix/mac_overflow
branch
from
August 3, 2026 02:23
b9c2a6f to
2a372f4
Compare
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.
第二个合并方式