diff --git a/src/components/chat_view/chat_view.vue b/src/components/chat_view/chat_view.vue index ebe3cc99c..bc75ef64d 100644 --- a/src/components/chat_view/chat_view.vue +++ b/src/components/chat_view/chat_view.vue @@ -106,8 +106,8 @@ :disable-submit="isConversation ? !!replyStatus : (errorLoadingChat || !chat)" :optimistic-posting="!isConversation" - :submit-on-enter="!mobileLayout" - :preserve-focus="!mobileLayout" + chat-view + preserve-focus :auto-focus="!mobileLayout" :placeholder="formPlaceholder" :file-limit="isConversation ? null : 1" diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6b26103ef..3b5daf56f 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -98,13 +98,13 @@ const PostStatusForm = { draftId: String, // ID of the draft to be used // Chats stuff + chatView: Boolean, // Used for the "submit on enter" user setting maxHeight: Number, placeholder: String, postHandler: Function, // Used to override poster to use chats one instead of status one preserveFocus: Boolean, // Keep focus on form after posting autoFocus: Boolean, // Steal focus when form is opened fileLimit: Number, // Chats only support 1 attachment :( - submitOnEnter: Boolean, emojiPickerPlacement: String, optimisticPosting: Boolean, // Don't wait for confirmation that post is done @@ -562,6 +562,9 @@ const PostStatusForm = { useMergedConfigStore().mergedConfig.hideScopeNotice ) }, + submitOnEnter() { + return this.chatView && this.mergedConfig.chatSubmitOnEnter + }, // Global stuff currentUser() { diff --git a/src/components/settings_modal/tabs/composing_tab.vue b/src/components/settings_modal/tabs/composing_tab.vue index 755539096..b8c156bd3 100644 --- a/src/components/settings_modal/tabs/composing_tab.vue +++ b/src/components/settings_modal/tabs/composing_tab.vue @@ -83,6 +83,13 @@ {{ $t('settings.subject_line_behavior') }} +