mirror of
https://github.com/9001/copyparty.git
synced 2026-06-21 21:52:25 -06:00
fix href image view not preventing default when init order wrong
This commit is contained in:
parent
43c23d75fd
commit
7bb7f30961
|
|
@ -1380,7 +1380,7 @@ function init(){
|
||||||
thegrid.bagit();
|
thegrid.bagit();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log('loop');
|
console.log('wait for grid init');
|
||||||
setTimeout(init, 100)
|
setTimeout(init, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6295,8 +6295,11 @@ window.thegrid = (function () {
|
||||||
window.open(qhref, '_blank');
|
window.open(qhref, '_blank');
|
||||||
|
|
||||||
else {
|
else {
|
||||||
if (!dbl)
|
if (!dbl){
|
||||||
|
if(r.bbox && e.preventDefault)
|
||||||
|
e.preventDefault();
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
r.sel = true;
|
r.sel = true;
|
||||||
|
|
@ -6511,7 +6514,6 @@ window.thegrid = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
r.dirty = false;
|
r.dirty = false;
|
||||||
//r.bagit('#ggrid');
|
|
||||||
r.loadsel();
|
r.loadsel();
|
||||||
aligngriditems();
|
aligngriditems();
|
||||||
setTimeout(r.tippen, 20);
|
setTimeout(r.tippen, 20);
|
||||||
|
|
@ -6539,6 +6541,7 @@ window.thegrid = (function () {
|
||||||
|
|
||||||
if(!isrc)
|
if(!isrc)
|
||||||
isrc = thegrid.en ? '#ggrid' : '#files'
|
isrc = thegrid.en ? '#ggrid' : '#files'
|
||||||
|
|
||||||
var br = baguetteBox.run(isrc, {
|
var br = baguetteBox.run(isrc, {
|
||||||
noScrollbars: true,
|
noScrollbars: true,
|
||||||
duringHide: r.onhide,
|
duringHide: r.onhide,
|
||||||
|
|
@ -6558,8 +6561,8 @@ window.thegrid = (function () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
r.bbox = true;
|
|
||||||
r.bbox_opts = br[1];
|
r.bbox_opts = br[1];
|
||||||
|
r.bbox = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
r.onhide = function () {
|
r.onhide = function () {
|
||||||
|
|
@ -10986,9 +10989,15 @@ function reload_browser() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sel_start(e) {
|
function sel_start(e) {
|
||||||
|
try{
|
||||||
if (e.button !== 0 && e.type !== 'touchstart') return;
|
if (e.button !== 0 && e.type !== 'touchstart') return;
|
||||||
if (!thegrid.en || !treectl.dsel) return;
|
if (!thegrid.en || !treectl.dsel) return;
|
||||||
if (e.target.closest('#widget,#ops,.opview,.doc,#ggrid>a')) return;
|
if (e.target.closest('#widget,#ops,.opview,.doc,#ggrid>a')) return;
|
||||||
|
}
|
||||||
|
catch(ex){
|
||||||
|
console.log(ex);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.target.closest('#gfiles'))
|
if (e.target.closest('#gfiles'))
|
||||||
ebi('gfiles').style.userSelect = "none"
|
ebi('gfiles').style.userSelect = "none"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue