X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8aa278d48c18ce68ab3f2d95ce4fd9a5177bd77b..641d6d24af0b42ebcc999e6623cd97c24b407c91:/js/common.js diff --git a/js/common.js b/js/common.js index e19f7f209..f8533d5e7 100644 --- a/js/common.js +++ b/js/common.js @@ -235,7 +235,11 @@ $(function () { } } - // legacy. sone forms install these + // scroll to the active element. jQuery.focus doesn't do this + // TODO: find out how to reliably frame the active element + window.scrollTo(0, document.activeElement.getBoundingClientRect().top); + + // legacy. some forms install these if (typeof fokus == 'function') { fokus(); return; } if (focus_by_name('cursor_fokus')) return; }, 0);