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.

DropTarget hover only fires when pointer hovers over the component, not the dragged item box

See original GitHub issue

There is a line in docs which says:

hover(props, monitor, component): Optional. Called when an item is hovered over the component

But in my tests (with HTML5 backend) hover is only fired when mouse pointer hovers over the drop target component. I’d expect that any boundary of the item crossing drop target would trigger this event.

Looks like it is HTML5 API behavor, but is there any way to make hover behave as I described (and as described in docs)?

The use case I have is that I need to drag and drop relatively big items and dragging point is usually at item’s header, so the user experience when moving such items up is OK, but moving down is a pain, because you often have to scroll the page to drop.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:9

github_iconTop GitHub Comments

1reaction
Pavel910commented, Jul 13, 2018

@vladar I know it’s an old thread but have you found a solution to this problem? Thx.

1reaction
goldocommented, Nov 2, 2017

@kafein nope, juste using smaller elements to make it look nicer. Havent had time to try others things

Read more comments on GitHub >

github_iconTop Results From Across the Web

React DnD make dropTargets when hover on something while ...
I'm able to show a drop area while dragging, it shows every time, but I need to show that drop area only hover...
Read more >
gaearon/react-dnd - Gitter
I'm having an issue with drag / dropping components that open up to have a text input. Dnd interferes with editing text in...
Read more >
Drag'n'Drop with mouse events - The Modern JavaScript Tutorial
The problem is that, while we're dragging, the draggable element is always above other elements. And mouse events only happen on the top...
Read more >
HTML Drag and Drop API - MDN Web Docs
A typical drag operation begins when a user selects a draggable element, drags the element to a droppable element, and then releases the...
Read more >
The Future of Drag and Drop APIs - Medium
Front-end development matures. We used to keep state in global variables and DOM. Then we wired our apps with message buses and used ......
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