Closed admin-greyatom closed 6 years ago
Hi,
I don't feel it has anything to do with size of the secondary div. When dragging the splitter and mouse moves inside an iframe
, its parent (our component) is not receiving any event and thus our splitter stops responding. This behavior is by specification and I don't know any simple fix. Please point out if I'm wrong.
However, I found this answer on StackOverflow as a workaround: disable mouse events of the iframe when drag starts and enable it after drag finishes. You can use onDragStart
and onDragEnd
events and do something like this:
handleDragStart() {
this.iframeControl.style.pointerEvents = 'none';
}
handleDragEnd() {
this.iframeControl.style.pointerEvents = 'all';
}
render() {
return (
<SplitterLayout onDragStart={this.handleDragStart} onDragEnd={this.handleDragEnd}>
...
<div>
<iframe ... ref={(c) => { this.iframeControl = c; }} />
</div>
</SplitterLayout>
);
}
Closing this due to no further information.
The drag down only works if I give my iframe top 50px or more. anything less than 50px second div gets stuck while dragging down. it starts again when clicked outside of SplitterLayout area.
I think this is due to some hight calculation in SplitterLayout but not able to figure out what style should I apply in my CSS in order to fix this.
drag up is working properly.