Merge pull request #3079 from timsnadden/3.1

Fix 'Uncaught ReferenceError: jQuery is not defined'
This commit is contained in:
Ingo Schommer 2014-05-03 14:29:03 +12:00
commit 447c1b97c2

View File

@ -124,7 +124,7 @@ class MemberLoginForm extends LoginForm {
$js = <<<JS
(function() {
var el = document.getElementById("MemberLoginForm_LoginForm_Email");
if(el && el.focus && (!jQuery || jQuery(el).is(':visible'))) el.focus();
if(el && el.focus && (typeof jQuery == 'undefined' || jQuery(el).is(':visible'))) el.focus();
})();
JS;
Requirements::customScript($js, 'MemberLoginFormFieldFocus');