react-split-pane icon indicating copy to clipboard operation
react-split-pane copied to clipboard

fix iframe - mouse event while dragging

Open sytolk opened this issue 4 years ago • 1 comments
trafficstars

sytolk avatar May 14 '21 07:05 sytolk

Hi! You can fix this problem with external library API, example code:

.split_conteiner {
    position: relative
    ...
}
.mouse_blocker {
    width: 100%;
    height: 100%';
    position: absolute;
    z-index: 100;
    opacity: 0;
}

function SplitPaneBlock (props: SomeProps) {
    const [active, setActive] = React.useState<boolean>(false);
    const onStartHandler = () => { setActive(true); }
    const onFinishedHandler = () => { setActive(false); }

    return (
        <div className="split_conteiner"> 
            {active && (<div className="mouse_blocker"/>)}
            <SplitPane
                ...
                onDragStarted={onStartHandler}
                onDragFinished={onFinishedHandler}
            >
                ...
            </SplitPane>
        </div>
    )
}

It`s work for me

Vadim-1507 avatar Dec 27 '22 07:12 Vadim-1507