mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
avoid firefox-android quirk(?):
when repeatedly tapping the next-folder button, occasionally it will reload the entire page instead of ajax'ing the directory contents. Navigation happens by simulating a click in the directory sidebar, so the incorrect behavior matches what would happen if the link to the folder didn't have its onclick-handler attached, so should probably double-check if there's some way for that to happen Issue observed fairly easily in firefox on android, regardless if copyparty is running locally or on a server in a different country. Unable to reproduce with android-chrome or desktop-firefox Could also be due to an addon (dark-reader, noscript, ublock-origin) anyways, avoiding this by doing the navigation more explicitly
This commit is contained in:
parent
015b87ee99
commit
5d13ebb4ac
|
@ -4618,8 +4618,7 @@ function tree_neigh(n) {
|
||||||
if (act >= links.length)
|
if (act >= links.length)
|
||||||
act = 0;
|
act = 0;
|
||||||
|
|
||||||
treectl.dir_cb = tree_scrollto;
|
treectl.treego.call(links[act]);
|
||||||
links[act].click();
|
|
||||||
links[act].focus();
|
links[act].focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4638,7 +4637,7 @@ function tree_up(justgo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (act.previousSibling.textContent == '-') {
|
if (act.previousSibling.textContent == '-') {
|
||||||
act.previousSibling.click();
|
treectl.treego.call(act.previousSibling);
|
||||||
if (!justgo)
|
if (!justgo)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5569,7 +5568,7 @@ var treectl = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
links[a].className = cl;
|
links[a].className = cl;
|
||||||
links[a].onclick = treego;
|
links[a].onclick = r.treego;
|
||||||
links[a].onmouseenter = nowrap ? menter : null;
|
links[a].onmouseenter = nowrap ? menter : null;
|
||||||
links[a].onmouseleave = nowrap ? mleave : null;
|
links[a].onmouseleave = nowrap ? mleave : null;
|
||||||
}
|
}
|
||||||
|
@ -5631,7 +5630,7 @@ var treectl = (function () {
|
||||||
return els[a].click();
|
return els[a].click();
|
||||||
}
|
}
|
||||||
|
|
||||||
function treego(e) {
|
r.treego = function (e) {
|
||||||
if (ctrl(e))
|
if (ctrl(e))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue