fix: isolate Neovim panel scrolling
This commit is contained in:
+11
-1
@@ -1267,7 +1267,17 @@ function NeovimPanel({
|
||||
event.altKey ? "A" : "",
|
||||
].filter(Boolean).join("-");
|
||||
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
|
||||
ref={screenRef}
|
||||
className="nvim-screen-scroll"
|
||||
|
||||
@@ -292,6 +292,7 @@
|
||||
max-height: none;
|
||||
min-height: 240px;
|
||||
overflow: auto;
|
||||
overscroll-behavior: contain;
|
||||
background: var(--desk, #eee);
|
||||
outline: none;
|
||||
scrollbar-color: #58666d #171d20;
|
||||
@@ -335,6 +336,7 @@
|
||||
left: 1mm;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
overscroll-behavior: contain;
|
||||
background: transparent;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #829097 #fff;
|
||||
|
||||
Reference in New Issue
Block a user