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;
}
.resizing {
.left, .right {
user-select: none;
}
}
.move-overlay {
position: absolute;
height: 100%;

View file

@ -135,7 +135,11 @@ export const Splitter: React.FC<SplitterProps> = ({ additionalContainerClassName
useKeyboardShortcuts(setRelativeSplitValue)
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}>
<div
className={styles['move-overlay']}