mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-24 03:26:57 +00:00
Stop PointerDown event handling in divider buttons
This commit is contained in:
1 parent
0dd7d6ef10
commit
3544f40e36
1 file changed
+18
-6
@@ -58,20 +58,32 @@ const SplitPane = (props)=>{
|
|||||||
setLiveScroll(!liveScroll);
|
setLiveScroll(!liveScroll);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const DividerButton = ({ className, children, ...props })=>{
|
||||||
|
return <div
|
||||||
|
className={className}
|
||||||
|
onPointerDown={(e)=>{e.stopPropagation();}}
|
||||||
|
{...props} >
|
||||||
|
|
||||||
|
{children}
|
||||||
|
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
||||||
const renderMoveArrows = (showMoveArrows &&
|
const renderMoveArrows = (showMoveArrows &&
|
||||||
<>
|
<>
|
||||||
<div className='arrow left'
|
<DividerButton className='arrow left'
|
||||||
onClick={()=>setMoveSource(!moveSource)} >
|
onClick={()=>setMoveSource(!moveSource)} >
|
||||||
<i className='fas fa-arrow-left' />
|
<i className='fas fa-arrow-left' />
|
||||||
</div>
|
</DividerButton>
|
||||||
<div className='arrow right'
|
<DividerButton
|
||||||
|
className='arrow right'
|
||||||
onClick={()=>setMoveBrew(!moveBrew)} >
|
onClick={()=>setMoveBrew(!moveBrew)} >
|
||||||
<i className='fas fa-arrow-right' />
|
<i className='fas fa-arrow-right' />
|
||||||
</div>
|
</DividerButton>
|
||||||
<div id='scrollToggleDiv' className={liveScroll ? 'arrow lock' : 'arrow unlock'}
|
<DividerButton id='scrollToggleDiv' className={liveScroll ? 'arrow lock' : 'arrow unlock'}
|
||||||
onClick={liveScrollToggle} >
|
onClick={liveScrollToggle} >
|
||||||
<i id='scrollToggle' className={liveScroll ? 'fas fa-lock' : 'fas fa-unlock'} />
|
<i id='scrollToggle' className={liveScroll ? 'fas fa-lock' : 'fas fa-unlock'} />
|
||||||
</div>
|
</DividerButton>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user