mirror of
https://github.com/9001/copyparty.git
synced 2026-08-14 06:14:48 -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);
|
return onovercmn(this, e, true);
|
||||||
}
|
}
|
||||||
function onovercmn(self, e, btn) {
|
function onovercmn(self, e, btn) {
|
||||||
|
var ok = false;
|
||||||
try {
|
try {
|
||||||
var ok = false, dt = e.dataTransfer.types;
|
var dt = e.dataTransfer.types;
|
||||||
for (var a = 0; a < dt.length; a++)
|
|
||||||
|
for (var a = 0; a < dt.length && !ok; a++)
|
||||||
if (dt[a] == 'Files')
|
if (dt[a] == 'Files')
|
||||||
ok = true;
|
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;
|
ok = true;
|
||||||
if (toast.txt == L.u_uri)
|
|
||||||
toast.hide();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return toast.inf(10, L.u_uri) || true;
|
return toast.inf(10, L.u_uri) || true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ok)
|
if (toast.txt == L.u_uri && ok)
|
||||||
return true;
|
toast.hide();
|
||||||
}
|
}
|
||||||
catch (ex) { }
|
catch (ex) { }
|
||||||
|
if (!ok)
|
||||||
|
return true;
|
||||||
|
|
||||||
ev(e);
|
ev(e);
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue