From: Moritz Bunkus Date: Wed, 15 Jul 2015 09:25:36 +0000 (+0200) Subject: Focus: »erstes fokussierbares Element« nicht »Element mit initial_focus« überschreiben X-Git-Tag: release-3.3.0beta~32^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6c016a500be8c5de4e457d1a26bd349343ac5e61;p=kivitendo-erp.git Focus: »erstes fokussierbares Element« nicht »Element mit initial_focus« überschreiben --- diff --git a/js/common.js b/js/common.js index 3a855299f..8ab2a5bc8 100644 --- a/js/common.js +++ b/js/common.js @@ -194,6 +194,10 @@ $(document).ready(function () { if (focussable(this)) window.focused_element = this; }); + // Lowest priority: first focussable element in form. + set_cursor_to_first_element(); + + // Medium priority: class set in template var initial_focus = $(".initial_focus").filter(':visible')[0]; if (initial_focus) $(initial_focus).focus(); @@ -201,7 +205,6 @@ $(document).ready(function () { // legacy. sone forms install these if (typeof fokus == 'function') { fokus(); return; } if (focus_by_name('cursor_fokus')) return; - set_cursor_to_first_element(); }); $('form').submit(function(){