projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8aa278d
)
focus: scroll to active element
author
Sven Schöling
<s.schoeling@linet-services.de>
Tue, 6 Dec 2016 12:47:20 +0000
(13:47 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 6 Jan 2017 10:22:43 +0000
(11:22 +0100)
js/common.js
patch
|
blob
|
history
diff --git
a/js/common.js
b/js/common.js
index
e19f7f2
..
84e0b26
100644
(file)
--- a/
js/common.js
+++ b/
js/common.js
@@
-235,6
+235,10
@@
$(function () {
}
}
+ // 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. sone forms install these
if (typeof fokus == 'function') { fokus(); return; }
if (focus_by_name('cursor_fokus')) return;