react-grid-layout icon indicating copy to clipboard operation
react-grid-layout copied to clipboard

onDrag is triggered when clicking the <div>

Open rizhaoyuanshan opened this issue 9 months ago • 2 comments

Describe the bug

onDrag is triggered when clicking the

,the div is flashing

Your Example Website or App

https://codesandbox.io/p/sandbox/late-lake-lkfrqy?file=%2Fsrc%2Findex.js%3A59%2C25

Steps to Reproduce the Bug or Issue

  1. click the div
  2. drag is triggered

Expected behavior

.

react-grid-layout library version

1.5.1

Operating System Version

macOS

Browser

Chrome

Additional context

No response

Screenshots or Videos

No response

rizhaoyuanshan avatar Apr 10 '25 12:04 rizhaoyuanshan

hi @rizhaoyuanshan, i also experienced the same thing, for the time being you can use <Select className="noDrag" /> to overcome this problem. for example when there is a select component, input, or anything that requires a click in it, hopefully it helps.

daffaharizal avatar Apr 30 '25 06:04 daffaharizal

hello @rizhaoyuanshan, were u able to overcome this?

baejed avatar Nov 05 '25 16:11 baejed