mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
up2k: fix dragdrop datatransfer type detection;
`text/uri-list` observed before `Files` once on wayland dolphin Co-authored-by: Til Schmitter <til.schmitter@gmail.com>
This commit is contained in:
parent
a7c99094dd
commit
daf144af61
|
|
@ -1069,25 +1069,28 @@ function up2k_init(subtle) {
|
|||
return onovercmn(this, e, true);
|
||||
}
|
||||
function onovercmn(self, e, btn) {
|
||||
var ok = false;
|
||||
try {
|
||||
var ok = false, dt = e.dataTransfer.types;
|
||||
for (var a = 0; a < dt.length; a++)
|
||||
var dt = e.dataTransfer.types;
|
||||
|
||||
for (var a = 0; a < dt.length && !ok; a++)
|
||||
if (dt[a] == 'Files')
|
||||
ok = true;
|
||||
else if (dt[a] == 'text/uri-list') {
|
||||
if (btn) {
|
||||
|
||||
for (var a = 0; a < dt.length && !ok; a++)
|
||||
if (dt[a] == 'text/uri-list') {
|
||||
if (btn)
|
||||
ok = true;
|
||||
if (toast.txt == L.u_uri)
|
||||
toast.hide();
|
||||
}
|
||||
else
|
||||
return toast.inf(10, L.u_uri) || true;
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
return true;
|
||||
if (toast.txt == L.u_uri && ok)
|
||||
toast.hide();
|
||||
}
|
||||
catch (ex) { }
|
||||
if (!ok)
|
||||
return true;
|
||||
|
||||
ev(e);
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue