File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/components/NewMessage Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -574,14 +574,19 @@ export default {
574574 this .errorTitle = ' '
575575 },
576576
577- messageToEdit (newValue ) {
578- if (newValue) {
577+ messageToEdit (newValue , oldValue ) {
578+ if (newValue? .id === oldValue? .id ) {
579+ // Currently edited message was updated, keep cursor position
580+ return
581+ } else if (newValue) {
582+ // Enter editing mode or editing another message
579583 this .text = this .chatExtrasStore .getChatEditInput (this .token )
580584 this .chatExtrasStore .removeThreadTitle (this .token )
581585 if (this .parentMessage ) {
582586 this .chatExtrasStore .removeParentIdToReply (this .token )
583587 }
584588 } else {
589+ // Leaving editing mode
585590 this .text = this .chatInput
586591 }
587592
You can’t perform that action at this time.
0 commit comments