X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fcommon.js;h=285b02fef203f5dc165732c0b73a4d33580ade65;hb=b9e792cc95b5bf5076fbbad23f45c8c707dd4424;hp=5f13ee056e650d55c8fc6a1e38e8da798fcd55fb;hpb=f1c3810f3ed25965f708ec96ac806bcac1b14bb7;p=kivitendo-erp.git diff --git a/js/common.js b/js/common.js index 5f13ee056..285b02fef 100644 --- a/js/common.js +++ b/js/common.js @@ -221,7 +221,21 @@ $(function () { } } - // legacy. sone forms install these + // all of this screws with the native location.hash focus, so reimplement this as well + if (location.hash) { + var hash_name = location.hash.substr(1); + var $hash_by_id = $(location.hash + ':visible'); + if ($hash_by_id.length > 0) { + $hash_by_id.get(0).focus(); + } else { + var $by_name = $('[name=' + hash_name + ']:visible'); + if ($by_name.length > 0) { + $by_name.get(0).focus(); + } + } + } + + // legacy. some forms install these if (typeof fokus == 'function') { fokus(); return; } if (focus_by_name('cursor_fokus')) return; }, 0);