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.

Drag and drop not working on windows 10

See original GitHub issue

I have nw.js (webkit) desktop app with following js code

var holder = document.getElementById('holder');

holder.ondragover = function (e) {
    e.preventDefault();
    return false;
};

holder.ondragend = function (e) {
    e.preventDefault();
    return false;
};

holder.ondrop = function (event) {
    event.preventDefault();
    var files = event.dataTransfer.files;
    handleFileSelect(event);
};

On windows 8 and linux, this code works, but on windows 10, it won’t accept file drop. When i drag file over “holder” area, i get black circle icon.

I have tried to run app as administrator, and it don’t work. I made quick web page to try it in browser, and it works in both FF and Edge browsers.

Can someone help with this?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adamtal3commented, Nov 2, 2017

@onedevteam - Did you find the cause of this issue?

I’ve also had it - the thing is, that on my windows 10 it works but when I try it on my co-worker’s windows 10 I get the behavior you described (it’s like windows doesn’t allow the app to listen to drag events from outside of it. If you select text inside the webpage and darg it - the drag events do fire. It’s the files that are ignored).

1reaction
7dircommented, Mar 3, 2017

nwjs read files drag dorp not working on windows 10

nw.js v0.20.3
Node v7.6.0
Chromium 56.0.2924.87
commit hash: 3c5a269-a68dcfc-a2ef613-0e5235c
Read more comments on GitHub >

github_iconTop Results From Across the Web

drag and drop stopped working - Microsoft Community
When drag and drop doesn't work, left click a file in Windows Explorer or File Explorer, and keep the left click mouse button...
Read more >
Windows Drag and Drop Not Working – A Few Easy Fixes
The drag and drop not functioning on Windows 10 may be caused by a previous drag and drop activity that's trapped in the...
Read more >
Drag and Drop Not Working in Windows 10/11 PC Fix
Step 1: Go to the file or folder on your desktop that you want to drag, left-click on it. Step 2: While holding...
Read more >
How to Fix Not Working Drag and Drop Function on Windows ...
Restart the File Explorer to fix drag and drop not working on Windows 10 · Open Windows Task Manager (press Ctrl + Alt...
Read more >
Fix problem: Drag and drop not working in Windows
When drag and drop does not work, left-click a file in File Explorer and keep the left click mouse button pressed. While the...
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