Skip to content

Commit 1367a35

Browse files
committed
(fix) auto resize textarea with roomMessage
1 parent dcff654 commit 1367a35

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ChatWindow/Room.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,10 @@ export default {
329329
this.loadingMessages = true
330330
this.scrollIcon = false
331331
this.resetMessage(true)
332-
this.message = this.roomMessage
332+
if (this.roomMessage) {
333+
this.message = this.roomMessage
334+
setTimeout(() => this.onChangeInput(), 0)
335+
}
333336
}
334337
},
335338
messages(newVal, oldVal) {
@@ -543,6 +546,8 @@ export default {
543546
resizeTextarea() {
544547
const el = this.$refs['roomTextarea']
545548
549+
if (!el) return
550+
546551
const padding = window
547552
.getComputedStyle(el, null)
548553
.getPropertyValue('padding-top')

0 commit comments

Comments
 (0)