question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clicking a `grid-item`'s `draggableHandle` doesn't trigger `onDragStop` when click is released

See original GitHub issue

Exactly as the title says. If you just click a grid-items draggableHandle, it won’t trigger onDragStop because it’s only a click, and not a drag. But it does in fact trigger onDragStart. So if you disable rendering while moving/resizing, for example, the rendering is disabled… and stays disabled.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

3reactions
kanonirbrestcommented, Sep 20, 2021

onDragStop is not working at all

0reactions
woollstacommented, Apr 25, 2022

If anyone is still stuck on this and waiting for a workaround, I found that onDrag insead of onDragStart only fires on an actual drag, meaning using it in conjunction with onDragEnd will always work as expected. However as expected it does repeatedly fire while dragging and so might not be suitable for every problem, but for me where I’m just making sure some local isDragging state is correct, it works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`onDragStart` triggered on item click but `onDragEnd` Doesn't
A click on an item (not an actual drag) would trigger onDragStart but ... to a drag handle, such that clicking on the...
Read more >
Draggable: HTML click event not triggering onClick handler
It sets up a Draggable with an `onClick` listener which should turn the square blue when it is clicked. You can try this...
Read more >
React, How to prevent execution of click event after drag?
I have Draggable element and inside of it, I have a component with onClick event. At the end of the drag, the click...
Read more >
Change Log for Releases - ag-Grid
ag-Grid is a feature-rich datagrid available in Free or Enterprise versions. This page lists all the Changes completed in recent releases.
Read more >
drag and drop / reordering in Kendo UI for jQuery - Telerik
I need a way of changing the order of rows in a grid and updating the ... It doesn't work perfectly... if I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found