mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
fix dsel error with bbox active (#1494)
stop error when dragging outside window with dsel active; fixes 1491
This commit is contained in:
parent
ca406472f4
commit
7d81b9e837
|
|
@ -10036,7 +10036,7 @@ function reload_browser() {
|
||||||
if (e.target.closest('#widget,#ops,.opview,.doc')) return;
|
if (e.target.closest('#widget,#ops,.opview,.doc')) return;
|
||||||
|
|
||||||
if (e.target.closest('#gfiles'))
|
if (e.target.closest('#gfiles'))
|
||||||
ebi('gfiles').style.userSelect = "none"
|
ebi('gfiles').style.userSelect = "none";
|
||||||
|
|
||||||
var pos = getpp(e);
|
var pos = getpp(e);
|
||||||
startx = pos.x;
|
startx = pos.x;
|
||||||
|
|
@ -10077,7 +10077,9 @@ function reload_browser() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!dragging && dist > mvthresh && !window.getSelection().toString()) {
|
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';
|
fwrap.style.userSelect = 'none';
|
||||||
else return;
|
else return;
|
||||||
start_drag();
|
start_drag();
|
||||||
|
|
@ -10121,7 +10123,8 @@ function reload_browser() {
|
||||||
|
|
||||||
window.addEventListener('dragstart', function(e) {
|
window.addEventListener('dragstart', function(e) {
|
||||||
if (treectl.dsel && (is_selma || dragging)) {
|
if (treectl.dsel && (is_selma || dragging)) {
|
||||||
e.preventDefault();
|
if (!QS('body.bbox-open'))
|
||||||
|
ev(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue