From eddd070d40f2e245d14883eb5cc3f47af5ef2b5e Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sun, 16 Mar 2014 16:17:10 +0100 Subject: [PATCH] Unread scrolled upper --- app/js/directives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/directives.js b/app/js/directives.js index aba470e0..5a3ca031 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -219,7 +219,7 @@ angular.module('myApp.directives', ['myApp.filters']) var unreadSplit = $('.im_message_unread_split', scrollableWrap); if (unreadSplit[0]) { - scrollableWrap.scrollTop = unreadSplit[0].offsetTop; + scrollableWrap.scrollTop = Math.max(0, unreadSplit[0].offsetTop - 52); atBottom = false; } else { scrollableWrap.scrollTop = scrollableWrap.scrollHeight;