leo / electron-next

Build Electron apps using Next.js
https://github.com/leo/site/blob/beef3a7dc1dfd435a9d8377e3b1b59761ccb7fc7/pages/2017/electron-next.js
MIT License
548 stars 41 forks source link

Can't get drag and drop out of electron working with electron-next #29

Closed cbrwizard closed 2 years ago

cbrwizard commented 2 years ago

Hey, I cannot get d&d working with electron-next. Here is a minimal repo based on next.js's example. It doesn't work both when I run it in dev and when I run it from a distributable. When I drag an image out of the app it doesn't show any cursor and nothing happens when I release the mouse.

Screenshot 2022-03-28 at 18 49 22

At the same time I was able to get it working with electron quick start example, here is my repo for that.

I believe the issue might be related to electron-next. How can I debug this?

cbrwizard commented 2 years ago

Alright, turned out I forgot to add event.preventDefault(). This is the commit with the fix https://github.com/cbrwizard/nexj.js-with-electron-typescript/commit/e3fba369287c7506263c36db36ada0c61246808b#diff-5a46010a5570ab7e32855454c53ccc06bd1f7b08e2099db4ff3a3f0c584e3f05R31