File tree 1 file changed +4
-5
lines changed
packages/rocketchat-ui-message/client
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -250,13 +250,12 @@ Template.messageBox.events({
250
250
} ,
251
251
'focus .input-message' ( event , instance ) {
252
252
KonchatNotification . removeRoomNotification ( this . _id ) ;
253
- chatMessages [ this . _id ] . input = instance . find ( '.input-message' ) ;
254
- // Created by Vignesh on 22/08/2017
255
- if ( $ ( '.input-message' ) . val ( ) !== '' ) {
256
- chatMessages [ this . _id ] . input . updateAutogrow ( ) ;
253
+ const input = event . target ;
254
+ chatMessages [ this . _id ] . input = input ;
255
+ if ( event . target . value ) {
257
256
instance . isMessageFieldEmpty . set ( false ) ;
257
+ return typeof input . updateAutogrow === 'function' && input . updateAutogrow ( ) ;
258
258
}
259
- // End of creation by Vignesh on 22/08/2017
260
259
} ,
261
260
'click .send-button' ( event , instance ) {
262
261
const input = instance . find ( '.input-message' ) ;
You can’t perform that action at this time.
0 commit comments