react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

How to make a child element not draggable

Open wagnerpaz opened this issue 5 years ago • 6 comments

I have controls and areas in my child element that I don't want to be draggable. How can I delimit the content that is draggable?

wagnerpaz avatar Apr 25 '20 20:04 wagnerpaz

I have the same issue

furkanilhan avatar Apr 28 '20 17:04 furkanilhan

@wagnerpaz @furkanilhan Please use cancel if you don't want to drag.

https://github.com/bokuweb/react-rnd/blob/master/stories/cancel/cancel.tsx#L17

bokuweb avatar Apr 29 '20 03:04 bokuweb

In case anyone adds className="cancel" and wonders why it's not working, see this line: https://github.com/bokuweb/react-rnd/blob/master/stories/cancel/cancel.tsx#L8. Make sure to add that property.

Nantris avatar Aug 13 '20 21:08 Nantris

如果有人添加className="cancel"并想知道为什么它不起作用,请参阅以下行:https : //github.com/bokuweb/react-rnd/blob/master/stories/cancel/cancel.tsx#L8。确保添加该属性。

thank you

huihui925 avatar Dec 16 '20 14:12 huihui925

Add this to the readme? Super useful.

neuhausneuhaus avatar Mar 29 '22 16:03 neuhausneuhaus

It's in the readme.

Nantris avatar Mar 29 '22 18:03 Nantris