New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DragImagePreview does not work with touch backend #2206
Comments
I see someone opened a SO question here as well: https://stackoverflow.com/questions/60960230/cant-see-the-item-that-i-am-dragging-using-react-dnd |
I'm having the same problem, any updates on this? |
Same problem here. |
Same problem for me as well. |
Same problem only with the MouseBackend from https://github.com/zyzo/react-dnd-mouse-backend |
same problem when solved? |
+1 - same issue. |
same! |
Facing this issue any solution ? |
I solved it using react-dnd-preview. https://louisbrunner.github.io/dnd-multi-backend/packages/react-dnd-preview/ |
Same issue. Is it a bug of DragImagePreview ? @smooth-lee 's solution is the only alternative ? |
I believe the root cause here is that the HTML5 backend, which utilizes the HTML5 Drag and Drop API, offloads the drag preview generation to the browser API. Since in this case the TouchBackend is being used, this feature doesn't exist. Thus no drag preview is automatically generated for you. I believe that the Personally, I opted to implement the custom drag layer myself, as I already had for another DND use case in my app and also to minimize pulling in additional dependencies. |
After trying @ddykhoff's suggestion to use |
I tried the solution with Thank you! |
Still experiencing this issue, when dragging on mobile I am not able to see the element being dragged. Anyone find a decent solution? |
Still broken. You can use the |
@tommasini I'm having the same problem (drop/hover not working with touch backend). Did you ever get anywhere with this? |
No, I believe I went to other library at that time 😔 good luck 🍀 |
Describe the bug
When using the touch backend, there is no preview of the dragged element. Using DragPreviewImage does not seem to work.
Reproduction
You can find a codesandbox here: https://codesandbox.io/s/festive-borg-z01w6
This is just the DragPreviewImage example, with touch backend instead of html5
Steps to reproduce the behavior:
Expected behavior
Drag image preview should be visible like with html5 backend.
Desktop (please complete the following information):
OS: iOS 13.4
Browser Safari
OS: Mac 10.15.4
Browser: Chrome with DevTools Touch simulator
Version: 80.0.3987.149 (Official Build) (64-bit)
Context:
The text was updated successfully, but these errors were encountered: