react-draggable
react-draggable copied to clipboard
Bounds worked not as expected
trafficstars
Problem Report
I've tried putting two draggable elements inside each other and bounds them to the mainContainer but unfortunately, it didn't work as expected and I'd like to know if is this a bug or if am I doing it wrong?
<Draggable {...dragHandlers} bounds={"#MainContainer"}>
<div className="box">
<div>I</div>
<Draggable {...dragHandlers} bounds={"#MainContainer"}>
<strong id="anywhere" style={{ display: "inline-block" }}>
Move me Anywhere
</strong>
</Draggable>
<div> be dragged anywhere</div>
</div>
</Draggable>
</div>
Hi there! What were you expecting to happen? Thanks,