Revision fdc625b4
Von Sven Schöling vor fast 8 Jahren hinzugefügt
js/common.js | ||
---|---|---|
235 | 235 |
} |
236 | 236 |
} |
237 | 237 |
|
238 |
// scroll to the active element. jQuery.focus doesn't do this |
|
239 |
// TODO: find out how to reliably frame the active element |
|
240 |
window.scrollTo(0, document.activeElement.getBoundingClientRect().top); |
|
241 |
|
|
238 | 242 |
// legacy. sone forms install these |
239 | 243 |
if (typeof fokus == 'function') { fokus(); return; } |
240 | 244 |
if (focus_by_name('cursor_fokus')) return; |
Auch abrufbar als: Unified diff
focus: scroll to active element