From c414e9c33c5a292c7cba7a6e4dcea9d340132a18 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 2 Jul 2014 23:47:28 +0400 Subject: [PATCH] Fixed scroll bug --- app/js/directives.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index 975be88d..f5a67dbf 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -469,6 +469,7 @@ angular.module('myApp.directives', ['myApp.filters']) atBottom = false; } else { scrollableWrap.scrollTop = scrollableWrap.scrollHeight; + atBottom = true; } updateScroller(); $timeout(function () { @@ -515,7 +516,7 @@ angular.module('myApp.directives', ['myApp.filters']) $(scrollableWrap).removeClass('im_history_to_bottom'); $(scrollable).css({bottom: '', marginLeft: ''}); scrollableWrap.scrollTop = st + scrollableWrap.scrollHeight - sh; - + updateBottomizer(); moreNotified = false; @@ -596,7 +597,7 @@ angular.module('myApp.directives', ['myApp.filters']) }); function updateSizes (heightOnly) { - if (!element.is(':visible') || !$(element[0].parentNode).is(':visible')) { + if (!element.is(':visible') && !$(element[0].parentNode.parentNode).is(':visible')) { return; } if ($(sendFormWrap).is(':visible')) {