mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Added chatscroll check (#9814)
This commit is contained in:
@@ -284,6 +284,7 @@ export default {
|
|||||||
this.$set(this, 'activeChat', activeChat);
|
this.$set(this, 'activeChat', activeChat);
|
||||||
|
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
|
if (!this.$refs.chatscroll) return;
|
||||||
let chatscroll = this.$refs.chatscroll.$el;
|
let chatscroll = this.$refs.chatscroll.$el;
|
||||||
chatscroll.scrollTop = chatscroll.scrollHeight;
|
chatscroll.scrollTop = chatscroll.scrollHeight;
|
||||||
});
|
});
|
||||||
@@ -315,6 +316,7 @@ export default {
|
|||||||
this.newMessage = '';
|
this.newMessage = '';
|
||||||
|
|
||||||
Vue.nextTick(() => {
|
Vue.nextTick(() => {
|
||||||
|
if (!this.$refs.chatscroll) return;
|
||||||
let chatscroll = this.$refs.chatscroll.$el;
|
let chatscroll = this.$refs.chatscroll.$el;
|
||||||
chatscroll.scrollTop = chatscroll.scrollHeight;
|
chatscroll.scrollTop = chatscroll.scrollHeight;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user