@@ -300,12 +300,12 @@ export default {
300
300
watch: {
301
301
loadingMessages (val ) {
302
302
if (val) this .infiniteState = null
303
- else this .focusTextarea ()
303
+ else this .focusTextarea (true )
304
304
},
305
305
room (newVal , oldVal ) {
306
306
if (newVal .roomId && newVal .roomId !== oldVal .roomId ) {
307
307
this .loadingMessages = true
308
- this .resetMessage ()
308
+ this .resetMessage (true )
309
309
this .$emit (' typingMessage' , this .message )
310
310
}
311
311
},
@@ -413,15 +413,15 @@ export default {
413
413
addNewMessage (message ) {
414
414
this .newMessages .push (message)
415
415
},
416
- resetMessage () {
416
+ resetMessage (disableMobileFocus ) {
417
417
this .resetTextareaSize ()
418
418
this .message = ' '
419
419
this .editedMessage = {}
420
420
this .messageReply = null
421
421
this .file = null
422
422
this .imageFile = null
423
423
this .emojiOpened = false
424
- setTimeout (() => this .focusTextarea (), 0 )
424
+ setTimeout (() => this .focusTextarea (disableMobileFocus ), 0 )
425
425
},
426
426
resetImageFile () {
427
427
this .imageFile = null
@@ -433,8 +433,8 @@ export default {
433
433
if (! this .$refs [' roomTextarea' ]) return
434
434
this .$refs [' roomTextarea' ].style .height = ' 20px'
435
435
},
436
- focusTextarea () {
437
- if (this . isMobile ) return
436
+ focusTextarea (disableMobileFocus ) {
437
+ if (detectMobile () && disableMobileFocus ) return
438
438
this .$refs [' roomTextarea' ].focus ()
439
439
},
440
440
isMessageEmpty () {
@@ -619,7 +619,7 @@ export default {
619
619
.container-scroll {
620
620
background : var (--chat-content-bg-color );
621
621
flex : 1 ;
622
- overflow-y : auto ;
622
+ overflow-y : scroll ;
623
623
margin-right : 1px ;
624
624
padding-top : 60px ;
625
625
-webkit-overflow-scrolling : touch ;
@@ -671,7 +671,7 @@ export default {
671
671
672
672
.reply-container {
673
673
display : flex ;
674
- padding : 10px 10px 10px ;
674
+ padding : 10px 10px 0 10px ;
675
675
background : var (--chat-content-bg-color );
676
676
align-items : center ;
677
677
max-width : 100% ;
@@ -869,6 +869,10 @@ textarea {
869
869
}
870
870
}
871
871
872
+ .reply-container {
873
+ padding : 5px 8px ;
874
+ }
875
+
872
876
.icon-scroll {
873
877
bottom : 70px ;
874
878
}
0 commit comments