From e92b111df5e022e68517682cf48ab5f73adc9e79 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 18 Jun 2013 12:01:07 +0200 Subject: [PATCH] Optionales Fokus-Setzen via CSS-Klasse "initial_focus" --- js/common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/common.js b/js/common.js index 8e3e5a120..71f1d3104 100644 --- a/js/common.js +++ b/js/common.js @@ -192,6 +192,11 @@ $(document).ready(function () { $('input').focus(function(){ if (focussable(this)) window.focused_element = this; }); + + var initial_focus = $(".initial_focus").filter(':visible')[0]; + if (initial_focus) + $(initial_focus).focus(); + // legacy. sone forms install these if (typeof fokus == 'function') { fokus(); return; } if (focus_by_name('cursor_fokus')) return; -- 2.20.1