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

Fix editing event from search room view #11992

Merged
merged 10 commits into from
Dec 19, 2023
2 changes: 1 addition & 1 deletion src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
// Quit early if we're trying to edit events in wrong rendering context
if (payload.timelineRenderingType !== this.state.timelineRenderingType) return;
const editState = payload.event ? new EditorStateTransfer(payload.event) : undefined;
this.setState({ editState }, () => {
this.setState({ editState, search: undefined }, () => {
if (payload.event) {
this.messagePanel?.scrollToEventIfNeeded(payload.event.getId());
}
Expand Down
Loading