react-beautiful-dnd icon indicating copy to clipboard operation
react-beautiful-dnd copied to clipboard

Clicking only works on the center of Drag handlers

Open YahngSungho opened this issue 2 years ago • 6 comments

beautifulDnDClick

As shown in the attached GIF, clicks only work on the center of the elements. I want clicks to also work on the edges of drag handlers...

In this case, what keywords should I search for to solve the problem?

My code is as follows (simplified)

    <div {...dragableHandleProps}>
        <button />
    </div>

And here is the real code

    <div {...dragableHandleProps}>
        <Button icon={'drag-handle-vertical'} minimal className={'visibleIfHover3 grabCursor'} />
      </div>

The Button component is from https://blueprintjs.com/docs/#core/components/button But anyway, the click event is captured by the div tag

YahngSungho avatar Jun 18 '22 06:06 YahngSungho

I have a similar issue. Not sure what is causing it.

yobananaboy15 avatar Jun 22 '22 22:06 yobananaboy15

Does anyone have any clues? Please...

YahngSungho avatar Jun 23 '22 04:06 YahngSungho

I managed to solve it by removing the button component and simply wrapping the icon in a div. Try that.

yobananaboy15 avatar Jun 23 '22 06:06 yobananaboy15

@yobananaboy15 Do you mean that you replaced the button with the icon??

YahngSungho avatar Jun 23 '22 06:06 YahngSungho

Exactly. Try removing the button and replace it with the icon you want to use.

yobananaboy15 avatar Jun 23 '22 06:06 yobananaboy15

@yobananaboy15 Thanks. But I want to use the buttons...

YahngSungho avatar Jun 23 '22 06:06 YahngSungho