diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index deb0d9b0..06c92b85 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -3996,6 +3996,9 @@ document.onkeydown = function (e) { } } + if (k == 'Enter' && ae && (ae.onclick || ae.hasAttribute('tabIndex'))) + return ev(e) && ae.click() || true; + if (aet && aet != 'a' && aet != 'tr' && aet != 'pre') return; diff --git a/copyparty/web/splash.js b/copyparty/web/splash.js index 3e36d23d..701daff4 100644 --- a/copyparty/web/splash.js +++ b/copyparty/web/splash.js @@ -40,5 +40,6 @@ for (var k in (d || {})) { } tt.init(); -if (!ebi('c')) - QS('input[name="cppwd"]').focus(); +var o = QS('input[name="cppwd"]'); +if (!ebi('c') && o.offsetTop + o.offsetHeight < window.innerHeight) + o.focus();