Fixed chatbody's srolling on increasing font-size

This commit is contained in:
Oleksandr Zhurbenko 2015-11-06 13:06:17 -08:00
parent 4b0bce343b
commit 849b58d8cb
2 changed files with 6 additions and 0 deletions

View File

@ -594,6 +594,9 @@ Handlebars.registerHelper "getPollQuestions", ->
else
return null
@scrollChatDown = () ->
$('#chatbody').scrollTop($('#chatbody')[0]?.scrollHeight)
# changes the height of the chat input area if needed (based on the textarea content)
@adjustChatInputHeight = () ->
if isLandscape()

View File

@ -29,6 +29,7 @@ Template.optionsFontSize.events
else
setInSession "messageFontSize", getInSession("messageFontSize") - 2
adjustChatInputHeight()
setTimeout(scrollChatDown, 0)
if $('#increaseFontSize').html() is 'MAX'
$('#increaseFontSize').html('')
$('#increaseFontSize').addClass('icon fi-plus')
@ -41,6 +42,8 @@ Template.optionsFontSize.events
else
setInSession "messageFontSize", getInSession("messageFontSize") + 2
adjustChatInputHeight()
setTimeout(scrollChatDown, 0)
if $('#decreaseFontSize').html() is 'MIN'
$('#decreaseFontSize').html('')
$('#decreaseFontSize').addClass('icon fi-minus')