Skip to content

Commit bbbc751

Browse files
cyfung1031Copilot
andauthored
🐛 在根布局建立滚轮事件边界,避免 ScriptCat 内部滚动触发浏览器 swipe 跳页 (#1431)
* fix(UI): 避免页面互动触发 body 的 swipe 跳页 * code update * InteractiveContainer -> ScrollBoundary * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent b214ca7 commit bbbc751

3 files changed

Lines changed: 252 additions & 188 deletions

File tree

src/index.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,28 @@
22
@unocss default;
33
@unocss;
44

5+
* {
6+
scrollbar-color: inherit;
7+
}
8+
59
body {
610
scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
7-
/* 对于webkit浏览器的滚动条样式 */
8-
scrollbar-width: thin;
911
}
1012

1113
body[arco-theme='dark'] {
1214
--color-scrollbar-thumb: #6b6b6b;
1315
--color-scrollbar-track: #2d2d2d;
14-
--color-scrollbar-thumb-hover: #8c8c8c;
1516
}
1617

1718
body[arco-theme='light'] {
1819
--color-scrollbar-thumb: #6b6b6b;
1920
--color-scrollbar-track: #f0f0f0;
20-
--color-scrollbar-thumb-hover: #8c8c8c;
21+
}
22+
23+
#root {
24+
overscroll-behavior: none;
25+
contain: content;
26+
overflow: auto;
2127
}
2228

2329
:root {

0 commit comments

Comments
 (0)