Skip to content

Commit 42caae5

Browse files
committed
(fix) remove textarea focus on loaded messages
1 parent a23ed2c commit 42caae5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/lib/Room/Room.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ import RoomHeader from './RoomHeader/RoomHeader'
161161
import RoomFooter from './RoomFooter/RoomFooter'
162162
import RoomMessage from './RoomMessage/RoomMessage'
163163
164-
const { detectMobile } = require('../../utils/mobile-detection')
165-
166164
export default {
167165
name: 'Room',
168166
components: {
@@ -281,7 +279,6 @@ export default {
281279
this.infiniteState = null
282280
} else {
283281
if (this.infiniteState) this.infiniteState.loaded()
284-
this.focusTextarea(true)
285282
setTimeout(() => this.initIntersectionObserver())
286283
}
287284
},
@@ -374,14 +371,6 @@ export default {
374371
getFooterParentRef() {
375372
return this.$refs.roomFooterParent
376373
},
377-
getTextareaRef() {
378-
return this.getFooterParentRef()?.$refs.roomTextarea
379-
},
380-
focusTextarea(disableMobileFocus) {
381-
if (detectMobile() && disableMobileFocus) return
382-
if (!this.getTextareaRef()) return
383-
this.getTextareaRef().focus()
384-
},
385374
touchStart(touchEvent) {
386375
if (this.singleRoom) return
387376

0 commit comments

Comments
 (0)