Fixed chatbody's srolling on increasing font-size
This commit is contained in:
parent
4b0bce343b
commit
849b58d8cb
@ -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()
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user