Skip to content

Commit d1fa1e9

Browse files
authored
Merge pull request #1666 from GitlyHallows/provider-settings-scroll-bug
Added support for scrolling in the ‘Open in Editor’ instance, similar…
2 parents 4f15b5d + 70b19a4 commit d1fa1e9

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

webview-ui/src/components/settings/SettingsView.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,26 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
337337
</div>
338338
</TabHeader>
339339

340-
<TabContent className="p-0 divide-y divide-vscode-sideBar-background" onScroll={handleScroll}>
340+
<TabContent
341+
className="p-0 divide-y divide-vscode-sideBar-background"
342+
style={{
343+
maxHeight: "calc(100vh - 6rem)",
344+
height: "calc(100vh - 6rem)",
345+
overflowY: "scroll",
346+
overflowX: "hidden",
347+
WebkitOverflowScrolling: "touch",
348+
position: "relative",
349+
display: "block",
350+
msOverflowStyle: "-ms-autohiding-scrollbar",
351+
scrollbarWidth: "auto",
352+
scrollbarGutter: "stable",
353+
willChange: "scroll-position",
354+
}}
355+
onWheel={(e) => {
356+
const container = e.currentTarget
357+
container.scrollTop += e.deltaY
358+
}}
359+
onScroll={handleScroll}>
341360
<div ref={providersRef}>
342361
<SectionHeader>
343362
<div className="flex items-center gap-2">

0 commit comments

Comments
 (0)