From 5151df172292802f8eb2cf3f9efd8e1a6684dcc2 Mon Sep 17 00:00:00 2001 From: Piotr Bajer <12783610+piotr-bajer@users.noreply.github.com> Date: Fri, 30 Nov 2018 22:51:50 +0100 Subject: [PATCH] Fix new website's header covering sucess messages On new website there is 65/80px header that is fixed. When scrolling to alert element it is covering first messages. I have added correction for scroll location. --- js/donate_form.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/donate_form.js b/js/donate_form.js index 1d58f40..74b310b 100644 --- a/js/donate_form.js +++ b/js/donate_form.js @@ -215,7 +215,7 @@ sdf.validation = (function($) { } if(spark.livemode) { - $(window).scrollTop($(el).focus().position().top); + $(window).scrollTop($(el).focus().position().top - $('.c-header').height() - 20); } } @@ -269,9 +269,7 @@ sdf.validation = (function($) { + msg + '

'); - if(spark.livemode) { - alert_el.scrollIntoView(); - } + self.goto_element($(alert_el)); } self.stripe_response_handler = function(status, response) {