aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index a288f98f5..a3fade0ea 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -659,7 +659,7 @@ function collapseHeight() {
var position = $(window).scrollTop();
$(".wall-item-content, .directory-collapse").each(function() {
- var orgHeight = parseInt($(this).css('height'));
+ var orgHeight = $(this).outerHeight(true);
if(orgHeight > divmore_height) {
if(! $(this).hasClass('divmore')) {
@@ -679,7 +679,7 @@ function collapseHeight() {
beforeToggle: function(trigger, element, expanded) {
if(expanded) {
if((($(element).offset().top + divmore_height) - $(window).scrollTop()) < 65 ) {
- $(window).scrollTop($(window).scrollTop() - (orgHeight - divmore_height));
+ $(window).scrollTop($(window).scrollTop() - ($(element).outerHeight(true) - divmore_height));
}
}
}