zyzo / react-dnd-mouse-backend

Mouse Backend for react-dnd library
http://zyzo.github.io/react-dnd-mouse-backend/
MIT License
85 stars 30 forks source link

not work in Firefox #6

Closed ngnhat closed 7 years ago

Pumpuli commented 7 years ago

I'm not sure what OP means, but I'm facing an issue on Firefox. I'm using the mouse backend because HTML5 backend doesn't work inside SVG. While this library does work, it also selects text at the same time and that causes flickering among other things.

I tried adding event.preventDefault() to the mousedown handler here (it gets event as the second argument), and it seemed to work fine for me. I even had a click handler on the same element and that also worked after the change. Of course I don't know if it breaks some other edge case, I just quickly tested it with FF and Chrome.