stop error when dragging outside window with dsel active

fixes https://github.com/9001/copyparty/issues/1491
This commit is contained in:
icxes 2026-05-23 17:01:48 +03:00
parent 0c2eca43e6
commit e2510cb2fa
No known key found for this signature in database

View file

@ -10077,7 +10077,9 @@ function reload_browser() {
return;
}
if (!dragging && dist > mvthresh && !window.getSelection().toString()) {
if (fwrap = e.target.closest('#wrap'))
if (e.target instanceof Element)
fwrap = e.target.closest('#wrap');
if (fwrap)
fwrap.style.userSelect = 'none';
else return;
start_drag();