diff --git a/lib/templates_helpers/at_input.js b/lib/templates_helpers/at_input.js index 7a0c39f..0005785 100644 --- a/lib/templates_helpers/at_input.js +++ b/lib/templates_helpers/at_input.js @@ -4,7 +4,7 @@ */ 'use strict'; -AccountsTemplates.atInputRendered = function(){ +AccountsTemplates.atInputRendered.push(function(){ var fieldId = this.data._id; var queryKey = this.data.options && this.data.options.queryKey || fieldId; var currentR = Router.current(); @@ -12,17 +12,4 @@ AccountsTemplates.atInputRendered = function(){ if (inputQueryVal) { this.$("input#at-field-" + fieldId).val(inputQueryVal); } - - var parentData = Template.currentData(); - var state = (parentData && parentData.state) || AccountsTemplates.getState(); - - if (AccountsTemplates.options.focusFirstInput) { - var firstVisibleInput = _.find(AccountsTemplates.getFields(), function(f){ - return _.contains(f.visible, state); - }); - - if (firstVisibleInput && firstVisibleInput._id === fieldId) { - this.$("input#at-field-" + fieldId).focus(); - } - } -}; +});