fix: prevent splitter panels from being selected when resizing

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-03-24 13:51:31 +01:00
parent e97a426680
commit c1a816be36
2 changed files with 11 additions and 1 deletions

View file

@ -14,6 +14,12 @@
flex-direction: column; flex-direction: column;
} }
.resizing {
.left, .right {
user-select: none;
}
}
.move-overlay { .move-overlay {
position: absolute; position: absolute;
height: 100%; height: 100%;

View file

@ -135,7 +135,11 @@ export const Splitter: React.FC<SplitterProps> = ({ additionalContainerClassName
useKeyboardShortcuts(setRelativeSplitValue) useKeyboardShortcuts(setRelativeSplitValue)
return ( return (
<div ref={splitContainer} className={`flex-fill flex-row d-flex ${additionalContainerClassName || ''}`}> <div
ref={splitContainer}
className={`flex-fill flex-row d-flex ${additionalContainerClassName || ''}${
resizingInProgress ? ' ' + styles.resizing : ''
}`}>
<ShowIf condition={resizingInProgress}> <ShowIf condition={resizingInProgress}>
<div <div
className={styles['move-overlay']} className={styles['move-overlay']}