Repository navigation
fix: 打开对话框时页面不再左移半个滚动条 - #52
Merged
Merged
Conversation
html 的 scrollbar-gutter: stable 已经为滚动条留了位置,对话框锁滚动时又给 body 加上等宽的 右边距,同一段宽度扣了两次,居中的内容在每次打开对话框时左移半个滚动条。锁滚动时去掉这段 边距。
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.
页面出现滚动条、且系统滚动条占宽度(Windows、大多数 Linux 桌面)时,面板每打开一次对话框,内容就左移半个滚动条,关闭时再移回来。
html的scrollbar-gutter: stable已经为滚动条留了位置,对话框锁滚动时又给body加上等宽的右边距,同一段宽度扣了两次。index.css加一条规则,锁滚动时把这段边距归零。测试:带 15px 真实滚动条的浏览器里打开编辑节点对话框,改前标题、搜索框、表格左移 7.5px,
body从 1351px 变为 1336px;改后位置与宽度均不变。npm run build、oxlint、npm test通过。