fix: isolate Neovim panel scrolling

This commit is contained in:
user
2026-07-17 10:36:30 +02:00
parent 0816f27053
commit 71949fae8d
2 changed files with 13 additions and 1 deletions
+11 -1
View File
@@ -1267,7 +1267,17 @@ function NeovimPanel({
event.altKey ? "A" : "", event.altKey ? "A" : "",
].filter(Boolean).join("-"); ].filter(Boolean).join("-");
return ( return (
<section className="nvim-panel" aria-label="Neovim połączony z kontenerem"> <section
className="nvim-panel"
aria-label="Neovim połączony z kontenerem"
onWheel={event => {
event.stopPropagation();
const target = event.target;
if (!(target instanceof Element) || !target.closest(".nvim-screen-scroll")) {
event.preventDefault();
}
}}
>
<div <div
ref={screenRef} ref={screenRef}
className="nvim-screen-scroll" className="nvim-screen-scroll"
+2
View File
@@ -292,6 +292,7 @@
max-height: none; max-height: none;
min-height: 240px; min-height: 240px;
overflow: auto; overflow: auto;
overscroll-behavior: contain;
background: var(--desk, #eee); background: var(--desk, #eee);
outline: none; outline: none;
scrollbar-color: #58666d #171d20; scrollbar-color: #58666d #171d20;
@@ -335,6 +336,7 @@
left: 1mm; left: 1mm;
overflow-x: hidden; overflow-x: hidden;
overflow-y: scroll; overflow-y: scroll;
overscroll-behavior: contain;
background: transparent; background: transparent;
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: #829097 #fff; scrollbar-color: #829097 #fff;