From a12b2c8d337e864a707e069f80fde3ef33450e1a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 19 Dec 2016 20:36:40 +0100 Subject: fix contextualHelpFocus() to work wit sticky aside --- view/js/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/view/js/main.js b/view/js/main.js index bfe9d25a3..7b0a1ebed 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -451,10 +451,18 @@ function contextualHelpFocus(target, openSidePanel) { else { $("main").removeClass('region_1-on'); } + + var css_position = $(target).parent().css('position'); + if (css_position === 'fixed') { + $(target).parent().css('position', 'static'); + } + $('html,body').animate({ scrollTop: $(target).offset().top - $('nav').outerHeight(true) - $('#contextual-help-content').outerHeight(true)}, 'slow'); for (i = 0; i < 3; i++) { $(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0); } + + $(target).parent().css('position', css_position); } } -- cgit v1.2.3