Fix reference to non-existent jQuery collection

Raised on PR as comment:

e4b4be9d45 (r270781103)
This commit is contained in:
Tom Byers
2019-04-02 11:38:27 +01:00
parent 8d5e7e70ab
commit cb55fbb344

View File

@@ -2,14 +2,14 @@
"use strict";
Modules.Autofocus = function() {
this.start = function($component) {
var forceFocus = $component.data('forceFocus');
this.start = function(component) {
var forceFocus = $(component).data('forceFocus');
// if the page loads with a scroll position, we can't assume the item to focus onload
// is still where users intend to start
if (($(window).scrollTop() > 0) && !forceFocus) { return; }
$('input, textarea, select', $component).eq(0).trigger('focus');
$('input, textarea, select', component).eq(0).trigger('focus');
};
};