Drag and drop not working on windows 10
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?
Would you please post the version of NW.js?
It works for me with 0.13.0-rc2. Could you try with this version?
close until there is more information.
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
@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).
Same Issue.
I wrote an app where drag and drop is used and recently reinstalled windows and now it doesn't work.
Platform: Windows 10 Pro 19041.423
I tried in nw.js v0.46.3 v0.47.1 and v0.47.2 and is the same behaviour.
Just in case someone finds this useful some day:
I would think this is a Windows Issue because of this answer. Following the instructions of the accepted answer worked for me. Just in case I'll paste them here:
Author: SomeOne_learning_always October 3, 2015
This method worked for me, give it a try (and it can easily be undone).
Press Windows + R buttons.
Type Regedit in the window that appears.
This will open Windows Registry Editor.
You have to go to: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion > Policies > System
Find the key EnableLUA, and change 1 to 0.
Press OK and restart the computer
After the restart, Drag and Drop should work for all programs.
Credit to here: http://www.mladengradev.com/en/how-to-get-back-drag-and-drop-in-windows-8/#comment-396
Why is it that most of the fixes i have had to find to fix stupid W10 issues have come from 'private users' not so called MS experts who's suggestions don't work and/or their pathetic reset or reinstall philosophy. If this is the sort of advice MS engineers give (basically they have no idea of a fix), no wonder W10 (and other versions) have so many issues.