Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 4cbef21

Browse files
authored
Restore composer focus after event edit (#7065)
1 parent 57fae01 commit 4cbef21

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/components/views/rooms/EditMessageComposer.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
207207
event: null,
208208
timelineRenderingType: this.context.timelineRenderingType,
209209
});
210-
dis.fire(Action.FocusSendMessageComposer);
210+
dis.dispatch({
211+
action: Action.FocusSendMessageComposer,
212+
context: this.context.timelineRenderingType,
213+
});
211214
}
212215
event.preventDefault();
213216
break;
@@ -237,7 +240,10 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
237240
event: null,
238241
timelineRenderingType: this.context.timelineRenderingType,
239242
});
240-
dis.fire(Action.FocusSendMessageComposer);
243+
dis.dispatch({
244+
action: Action.FocusSendMessageComposer,
245+
context: this.context.timelineRenderingType,
246+
});
241247
};
242248

243249
private get shouldSaveStoredEditorState(): boolean {
@@ -431,7 +437,10 @@ class EditMessageComposer extends React.Component<IEditMessageComposerProps, ISt
431437
event: null,
432438
timelineRenderingType: this.context.timelineRenderingType,
433439
});
434-
dis.fire(Action.FocusSendMessageComposer);
440+
dis.dispatch({
441+
action: Action.FocusSendMessageComposer,
442+
context: this.context.timelineRenderingType,
443+
});
435444
};
436445

437446
private cancelPreviousPendingEdit(): void {

0 commit comments

Comments
 (0)