Revision 8aa278d4
Von Sven Schöling vor fast 8 Jahren hinzugefügt
js/common.js | ||
---|---|---|
221 | 221 |
} |
222 | 222 |
} |
223 | 223 |
|
224 |
// all of this screws with the native location.hash focus, so reimplement this as well |
|
225 |
if (location.hash) { |
|
226 |
var hash_name = location.hash.substr(1); |
|
227 |
var $hash_by_id = $(location.hash + ':visible'); |
|
228 |
if ($hash_by_id.length > 0) { |
|
229 |
$hash_by_id.get(0).focus(); |
|
230 |
} else { |
|
231 |
var $by_name = $('[name=' + hash_name + ']:visible'); |
|
232 |
if ($by_name.length > 0) { |
|
233 |
$by_name.get(0).focus(); |
|
234 |
} |
|
235 |
} |
|
236 |
} |
|
237 |
|
|
224 | 238 |
// legacy. sone forms install these |
225 | 239 |
if (typeof fokus == 'function') { fokus(); return; } |
226 | 240 |
if (focus_by_name('cursor_fokus')) return; |
Auch abrufbar als: Unified diff
js/common.js: hash focus funktionalität wiederhergestellt