diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 8b87d4c2..90cb9be8 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -571,6 +571,7 @@ pre, code, tt, #doc, #doc>code { overflow: hidden; width: 0; height: 0; + left: -10em; color: var(--bg); } html .ayjump:focus { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 002be4d9..1e8a9828 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -13420,9 +13420,11 @@ function eval_hash() { d.onclick = function (e) { ev(e); if (a) - QS(treectl.hidden ? '#path a:nth-last-child(2)' : '#treeul a.hl').focus(); + d = QS(treectl.hidden ? '#path a:nth-last-child(2)' : '#treeul a.hl'); else - QS(thegrid.en ? '#ggrid a' : '#files tbody tr[tabindex]').focus(); + d = QS(thegrid.en ? '#ggrid a' : '#files tbody tr[tabindex]'); + if (d) + d.focus(); }; })(a);