File tree Expand file tree Collapse file tree 5 files changed +17
-6
lines changed Expand file tree Collapse file tree 5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ fetchMessages({ room, options }) {
246
246
| ` link-options ` (19) | Object | - | ` { disabled: false, target: '_blank', rel: null } ` |
247
247
| ` room-info-enabled ` (20) | Boolean | - | ` false ` |
248
248
| ` textarea-action-enabled ` (21) | Boolean | - | ` false ` |
249
+ | ` textarea-auto-focus ` | Boolean | - | ` true ` |
249
250
| ` user-tags-enabled ` | Boolean | - | ` true ` |
250
251
| ` emojis-suggestion-enabled ` | Boolean | - | ` true ` |
251
252
| ` media-preview-enabled ` | Boolean | - | ` true ` |
Original file line number Diff line number Diff line change 58
58
:loading-rooms =" loadingRooms"
59
59
:room-info-enabled =" roomInfoEnabled"
60
60
:textarea-action-enabled =" textareaActionEnabled"
61
+ :textarea-auto-focus =" textareaAutoFocus"
61
62
:user-tags-enabled =" userTagsEnabled"
62
63
:emojis-suggestion-enabled =" emojisSuggestionEnabled"
63
64
:scroll-distance =" scrollDistance"
@@ -188,6 +189,7 @@ export default {
188
189
},
189
190
roomInfoEnabled: { type: Boolean , default: false },
190
191
textareaActionEnabled: { type: Boolean , default: false },
192
+ textareaAutoFocus: { type: Boolean , default: true },
191
193
userTagsEnabled: { type: Boolean , default: true },
192
194
emojisSuggestionEnabled: { type: Boolean , default: true },
193
195
roomMessage: { type: String , default: ' ' },
Original file line number Diff line number Diff line change 136
136
:show-footer =" showFooter"
137
137
:accepted-files =" acceptedFiles"
138
138
:textarea-action-enabled =" textareaActionEnabled"
139
+ :textarea-auto-focus =" textareaAutoFocus"
139
140
:user-tags-enabled =" userTagsEnabled"
140
141
:emojis-suggestion-enabled =" emojisSuggestionEnabled"
141
142
:templates-text =" templatesText"
@@ -207,6 +208,7 @@ export default {
207
208
loadingRooms: { type: Boolean , required: true },
208
209
roomInfoEnabled: { type: Boolean , required: true },
209
210
textareaActionEnabled: { type: Boolean , required: true },
211
+ textareaAutoFocus: { type: Boolean , required: true },
210
212
userTagsEnabled: { type: Boolean , required: true },
211
213
emojisSuggestionEnabled: { type: Boolean , required: true },
212
214
scrollDistance: { type: Number , required: true },
Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ export default {
235
235
showFooter: { type: Boolean , required: true },
236
236
acceptedFiles: { type: String , required: true },
237
237
textareaActionEnabled: { type: Boolean , required: true },
238
+ textareaAutoFocus: { type: Boolean , required: true },
238
239
userTagsEnabled: { type: Boolean , required: true },
239
240
emojisSuggestionEnabled: { type: Boolean , required: true },
240
241
templatesText: { type: Array , default: null },
@@ -792,7 +793,10 @@ export default {
792
793
this.files = []
793
794
this.emojiOpened = false
794
795
this.preventKeyboardFromClosing()
795
- setTimeout(() => this.focusTextarea(disableMobileFocus))
796
+
797
+ if (this.textareaAutoFocus || !initRoom) {
798
+ setTimeout(() => this.focusTextarea(disableMobileFocus))
799
+ }
796
800
},
797
801
resetTextareaSize() {
798
802
if (this.getTextareaRef()) {
Original file line number Diff line number Diff line change @@ -163,11 +163,11 @@ export interface Props {
163
163
'current-user-id' : StringNumber
164
164
rooms : Rooms
165
165
messages : Messages
166
- height ?: string
167
- theme ?: 'light' | 'dark'
168
- styles ?: Record < string , Record < string , string > >
169
- 'rooms-order' ?: 'desc' | 'asc'
170
- 'loading-rooms' ?: boolean
166
+ height ?: string
167
+ theme ?: 'light' | 'dark'
168
+ styles ?: Record < string , Record < string , string > >
169
+ 'rooms-order' ?: 'desc' | 'asc'
170
+ 'loading-rooms' ?: boolean
171
171
'rooms-loaded' ?: boolean
172
172
'room-id' ?: StringNumber
173
173
'load-first-room' ?: boolean
@@ -178,6 +178,8 @@ export interface Props {
178
178
'message-actions' ?: MessageActions
179
179
'message-selection-actions' ?: CustomActions
180
180
'templates-text' ?: TemplatesText
181
+ 'textarea-action-enabled' ?: boolean
182
+ 'textarea-auto-focus' ?: boolean
181
183
'auto-scroll' ?: AutoScroll
182
184
'show-search' ?: boolean
183
185
'show-add-room' ?: boolean
You can’t perform that action at this time.
0 commit comments