aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
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:36:40 +0100
commita12b2c8d337e864a707e069f80fde3ef33450e1a (patch)
tree00226874ce928c30cd2baba3783fef0f83257259 /view/js
parent3ad3d3037f8ba9643952bbf64e70c5edf302a73b (diff)
downloadvolse-hubzilla-a12b2c8d337e864a707e069f80fde3ef33450e1a.tar.gz
volse-hubzilla-a12b2c8d337e864a707e069f80fde3ef33450e1a.tar.bz2
volse-hubzilla-a12b2c8d337e864a707e069f80fde3ef33450e1a.zip
fix contextualHelpFocus() to work wit sticky aside
Diffstat (limited to 'view/js')
-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 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);
}
}