diff --git a/app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee b/app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee index 91161c6f8c..e85f9e5cee 100644 --- a/app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee +++ b/app/assets/javascripts/darkswarm/controllers/checkout/accordion_controller.js.coffee @@ -13,8 +13,9 @@ Darkswarm.controller "AccordionCtrl", ($scope, localStorageService, $timeout, $d # scroll location is closed by show(), scrollTo() will scroll to the old location of # the element. Putting this in a 50 ms timeout is enough delay for the DOM to # have updated. - $timeout (-> - $document.scrollTo $("##{section}"), offset_height, 500), 50 + $timeout -> + $document.scrollTo($("##{section}"), offset_height, 500) + , 50 $scope.$on 'purchaseFormInvalid', (event, form) -> # Scroll to first invalid section diff --git a/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee b/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee index e5aa1375c0..739d2de9bd 100644 --- a/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee +++ b/app/assets/javascripts/darkswarm/mixins/fieldset_mixin.js.coffee @@ -1,6 +1,7 @@ window.FieldsetMixin = ($scope)-> $scope.next = (event = false)-> event.preventDefault() if event + return unless $scope.nextPanel $scope.show $scope.nextPanel $scope.onTimeout = ->