fix: dragging files selects no text; without a drag the names select as before
This commit is contained in:
1 parent
bc1736f105
commit
96163ebf86
2 files changed
+5
-1
No files matched your search
@@ -407,7 +407,8 @@ body.dnd, body.dnd * { cursor:grabbing !important; }
|
|||||||
.dropdlg .dd-c { display:flex; align-items:center; gap:6px; }
|
.dropdlg .dd-c { display:flex; align-items:center; gap:6px; }
|
||||||
.dropdlg .mv-prog { margin-top:0; }
|
.dropdlg .mv-prog { margin-top:0; }
|
||||||
.dropdlg .dd-btns { display:flex; gap:6px; justify-content:flex-end; }
|
.dropdlg .dd-btns { display:flex; gap:6px; justify-content:flex-end; }
|
||||||
.fpane .fp-list tr[data-name] { user-select:none; }
|
/* Dragging rows: no text gets selected meanwhile (it can be selected otherwise). */
|
||||||
|
body.dnd, body.dnd * { user-select:none !important; -webkit-user-select:none !important; }
|
||||||
.empty { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
|
.empty { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; color:var(--muted); }
|
||||||
.empty[hidden] { display:none; }
|
.empty[hidden] { display:none; }
|
||||||
/* The "+" menu: a terminal here, or on another machine. */
|
/* The "+" menu: a terminal here, or on another machine. */
|
||||||
|
|||||||
@@ -50,6 +50,9 @@
|
|||||||
begin();
|
begin();
|
||||||
}
|
}
|
||||||
d.ghost.style.transform = 'translate(' + (ev.clientX + 12) + 'px,' + (ev.clientY + 10) + 'px)';
|
d.ghost.style.transform = 'translate(' + (ev.clientX + 12) + 'px,' + (ev.clientY + 10) + 'px)';
|
||||||
|
// What the browser began to select before the drag was told apart goes.
|
||||||
|
const sel = getSelection();
|
||||||
|
if (sel && !sel.isCollapsed) sel.removeAllRanges();
|
||||||
d.target = null;
|
d.target = null;
|
||||||
box.hidden = true;
|
box.hidden = true;
|
||||||
d.ghost.dataset.hint = '';
|
d.ghost.dataset.hint = '';
|
||||||
|
|||||||
Reference in new issue
Block a user