From c82eb22a2b7eb83af6d593dfd110f2198bc15cee Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Thu, 31 Jul 2014 23:41:40 +0100 Subject: [PATCH] Fixed mobile margin for small history --- app/js/directives.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/js/directives.js b/app/js/directives.js index 13634f9d..ea44b51a 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -673,7 +673,11 @@ angular.module('myApp.directives', ['myApp.filters']) function updateBottomizer () { $(historyMessagesEl).css({marginTop: 0}); - var marginTop = scrollableWrap.offsetHeight - historyMessagesEl.offsetHeight - 20 - 49; + var marginTop = scrollableWrap.offsetHeight + - historyMessagesEl.offsetHeight + - 20 + - (Config.Navigator.mobile ? 0 : 49); + if (historyMessagesEl.offsetHeight > 0 && marginTop > 0) { $(historyMessagesEl).css({marginTop: marginTop}); }