aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-12-19 20:36:40 +0100
committerMario Vavti <mario@mariovavti.com>2016-12-19 20:37:48 +0100
commit87248c9f47dca9f3862332430cc2f4e6160bb85a (patch)
tree1c2257ff89c0046cc2dc1f3ac7268ad74b5b4f21
parentac9974fd64b69c0712f826a6b8b9fffa7b0790a4 (diff)
downloadvolse-hubzilla-87248c9f47dca9f3862332430cc2f4e6160bb85a.tar.gz
volse-hubzilla-87248c9f47dca9f3862332430cc2f4e6160bb85a.tar.bz2
volse-hubzilla-87248c9f47dca9f3862332430cc2f4e6160bb85a.zip
fix contextualHelpFocus() to work wit sticky aside
-rw-r--r--view/js/main.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 3981d4266..a405f92f7 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);
}
}