We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2752df3 commit 5f635edCopy full SHA for 5f635ed
src/ChatWindow/Room/Room.vue
@@ -562,8 +562,13 @@ export default {
562
563
if (index !== this.messages.length - 1) return
564
565
+ const messageHeight = document.getElementById(message._id).offsetHeight
566
+ const autoScrollOffset = messageHeight + 60
567
+
568
setTimeout(() => {
- if (this.getBottomScroll(this.$refs.scrollContainer) < 60) {
569
+ if (
570
+ this.getBottomScroll(this.$refs.scrollContainer) < autoScrollOffset
571
+ ) {
572
this.scrollToBottom()
573
} else {
574
if (message.senderId === this.currentUserId) {
0 commit comments