From 708ab23fea2e48d7832584aca3b33209fbdd60cd Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 14 Mar 2024 16:20:08 +0100 Subject: [PATCH 1/3] fix(NewMessage): don't check for autocomplete open - component is capturing Esc event by itself after nextcloud/vue@8.10.0 Signed-off-by: Maksim Sukharev --- src/components/NewMessage/NewMessage.vue | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/NewMessage/NewMessage.vue b/src/components/NewMessage/NewMessage.vue index 181cda13bc7..c06a7f1baa1 100644 --- a/src/components/NewMessage/NewMessage.vue +++ b/src/components/NewMessage/NewMessage.vue @@ -104,8 +104,6 @@ @shortkey="focusInput" @keydown.esc="handleInputEsc" @keydown.ctrl.up="handleEditLastMessage" - @tribute-active-true.native="isTributePickerActive = true" - @tribute-active-false.native="isTributePickerActive = false" @input="handleTyping" @paste="handlePastedFiles" @submit="handleSubmit" /> @@ -335,7 +333,6 @@ export default { showPollEditor: false, showNewFileDialog: -1, showFilePicker: false, - isTributePickerActive: false, // Check empty template by default userData: {}, clipboardTimeStamp: null, @@ -960,17 +957,12 @@ export default { }, handleInputEsc() { - if (this.messageToEdit && !this.isTributePickerActive) { + if (this.messageToEdit) { this.handleAbortEdit() this.focusInput() return } - // When the tribute picker (e.g. emoji picker or mentions) is open - // ESC should only close the picker but not blur - if (!this.isTributePickerActive) { - this.blurInput() - } - + this.blurInput() }, handleEditLastMessage() { From ed27439744d60ed6dd9b5ebb4ef15ed19e3893e3 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 14 Mar 2024 17:18:45 +0100 Subject: [PATCH 2/3] revert(NewMessage): revert removed line from 9efb614ac0ec6346176dfc75384a3f1b42f6621b - could fill the input again after posting a message, if was sent before debounced update Signed-off-by: Maksim Sukharev --- src/components/NewMessage/NewMessage.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/NewMessage/NewMessage.vue b/src/components/NewMessage/NewMessage.vue index c06a7f1baa1..0301e5a99c1 100644 --- a/src/components/NewMessage/NewMessage.vue +++ b/src/components/NewMessage/NewMessage.vue @@ -621,6 +621,8 @@ export default { return } this.$nextTick(() => { + // reset or fill main input in chat view from the store + this.text = this.chatInput // refocus input as the user might want to type further this.focusInput() }) From 3c56ef678c6545cb0e6557a549b0863a8f20699b Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Thu, 14 Mar 2024 17:20:06 +0100 Subject: [PATCH 3/3] fix(NewMessage): compare value from store with parsed value - to avoid issues with special symbols described in #11803 Signed-off-by: Maksim Sukharev --- src/components/NewMessage/NewMessage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NewMessage/NewMessage.vue b/src/components/NewMessage/NewMessage.vue index 0301e5a99c1..552e159dcd6 100644 --- a/src/components/NewMessage/NewMessage.vue +++ b/src/components/NewMessage/NewMessage.vue @@ -523,7 +523,7 @@ export default { }, chatInput(newValue) { - if (this.text !== newValue) { + if (parseSpecialSymbols(this.text) !== newValue) { this.text = newValue } },