From 21bfb61b7a4db6370cc85481e4cb838077bb4f8b Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 15 Apr 2016 19:17:16 -0700 Subject: [PATCH] Maintain scroll position when textarea resizes Fixes #770 // FREEBIE --- js/views/conversation_view.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 289a67aed..7e5be9f1d 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -299,6 +299,13 @@ this.view.measureScrollPosition(); window.autosize(this.$messageField); + var $attachmentPreviews = this.$('.attachment-previews'), + $bottomBar = this.$('.bottom-bar'); + + $bottomBar.outerHeight( + this.$messageField.outerHeight() + + $attachmentPreviews.outerHeight() + 11); + this.view.scrollToBottomIfNeeded(); },