         .submit((e) ->
             if ($ @).find('.unhappy').length
                 e.preventDefault()
-                scrollTo(($ @).find('.unhappy').offset().top))
+                scrollTo(($ @).find('.unhappy').first()))
 
 if gon.page is 'orders_new' or gon.page is 'orders_edit' or gon.page is 'orders_create'
     $ ->

            .submit((e) ->
                if ($ @).find('.unhappy').length
                    e.preventDefault()
                    scrollTo(($ @).find('.unhappy').offset().top))


                        exp_year: $credit_card_expiration_year.val()
                    }, stripeResponseHandler)
                else
                    scrollTo(($ @).find('.unhappy').first())


render_nested_product_attribute_input = ($el) ->
