Skip to content

Commit 70b19a4

Browse files
committed
Added support for scrolling in the ‘Open in Editor’ instance, similar to how scrolling functions in the main instance.
1 parent 677e145 commit 70b19a4

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
@@ -317,7 +317,26 @@ const SettingsView = forwardRef<SettingsViewRef, SettingsViewProps>(({ onDone },
317317
</div>
318318
</TabHeader>
319319

320-
<TabContent className="p-0 divide-y divide-vscode-sideBar-background" onScroll={handleScroll}>
320+
<TabContent
321+
className="p-0 divide-y divide-vscode-sideBar-background"
322+
style={{
323+
maxHeight: "calc(100vh - 6rem)",
324+
height: "calc(100vh - 6rem)",
325+
overflowY: "scroll",
326+
overflowX: "hidden",
327+
WebkitOverflowScrolling: "touch",
328+
position: "relative",
329+
display: "block",
330+
msOverflowStyle: "-ms-autohiding-scrollbar",
331+
scrollbarWidth: "auto",
332+
scrollbarGutter: "stable",
333+
willChange: "scroll-position",
334+
}}
335+
onWheel={(e) => {
336+
const container = e.currentTarget
337+
container.scrollTop += e.deltaY
338+
}}
339+
onScroll={handleScroll}>
321340
<div ref={providersRef}>
322341
<SectionHeader>
323342
<div className="flex items-center gap-2">

0 commit comments

Comments
 (0)