scroll to bottom of chat window, always

This commit is contained in:
Achilles Rasquinha 2018-01-09 11:27:05 +05:30
parent ab51a2b827
commit 42b5fc0f87
2 changed files with 14 additions and 2 deletions

View file

@ -1495,7 +1495,7 @@ class extends Component
}
})
frappe.chat.message.on.create((r) =>
frappe.chat.message.on.create((r) =>
{
const { state } = this
@ -2395,6 +2395,18 @@ class extends Component
frappe.Chat.Widget.ChatList
=
class extends Component {
on_mounted ( )
{
const $element = $('.frappe-chat').find('.chat-list')
$element.scrollTop($element[0].scrollHeight)
}
on_updated ( )
{
const $element = $('.frappe-chat').find('.chat-list')
$element.scrollTop($element[0].scrollHeight)
}
render ( ) {
const { props } = this

File diff suppressed because one or more lines are too long