crash fix when dragging text

This commit is contained in:
Til Schmitter 2026-05-01 18:17:08 +02:00
parent 335d02a7c0
commit ff26c10a12
2 changed files with 23 additions and 7 deletions

View file

@ -544,6 +544,7 @@ html.y #path {
}
#path a.dtarget {
text-shadow: var(--f-sel-sh) 0 0 5px;
background: color-mix(var(--a), transparent);
}
#path #entree {
margin-left: -.7em;
@ -721,6 +722,7 @@ html.y #files span.fsz_P { font-weight: bold }
}
#files tr.dtarget {
box-shadow: 0 0 5px 0 var(--f-sel-sh) inset;
background: color-mix(var(--a), transparent);
}
#files tr.dtarget td {
background: none;
@ -1095,6 +1097,7 @@ html:not(.e) #ggrid>a.dir:before {
}
#ggrid a.dtarget {
box-shadow: 0 0 5px 0 var(--f-sel-sh);
background: color-mix(var(--a), transparent);
}
#files tr.sel a,
#files tr.sel a.play {
@ -1973,6 +1976,7 @@ html.a .btn {
}
#tree li a.dtarget {
box-shadow: 0 0 5px 0 var(--f-sel-sh) inset;
background: color-mix(var(--a) 30%, transparent);
}
#tree ul a.sel {
background: #000;

View file

@ -10589,9 +10589,15 @@ var drag = (function() {
var f = files[i];
f.draggable = true;
f.ondragstart = function(e) {
current = e.target;
currLink = basenames(current.querySelector("td:nth-child(2) a").href.split("?"));
r.no_warn = true;
try{
currLink = basenames(e.target.querySelector("td:nth-child(2) a").href.split("?"));
current = e.target;
r.no_warn = true;
}
catch(ex){
console.log(e.target)
console.log(ex)
}
};
f.ondragend = function() {
r.no_warn = false;
@ -10614,10 +10620,16 @@ var drag = (function() {
var f = files[i];
f.draggable = true;
f.ondragstart = function(e) {
var a = ebi(e.target.getAttribute("ref"));
current = a.closest("tr");
currLink = basenames(a.href.split("?"));
r.no_warn = true;
try{
var a = ebi(e.target.getAttribute("ref"));
current = a.closest("tr");
currLink = basenames(a.href.split("?"));
r.no_warn = true;
}
catch(ex){
console.log(e.target)
console.log(ex)
}
}
f.ondragend = function() {
r.no_warn = false;