mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix 'Uncaught ReferenceError: jQuery is not defined' if jQuery is not included in template.
This commit is contained in:
parent
ff42ad268e
commit
afad65ee71
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user