fix up arrow edit not working sometime

This commit is contained in:
Ajay Bura 2023-10-14 09:48:38 +05:30
parent b58983aaa8
commit 9f2789223f

View file

@ -694,14 +694,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
); );
const editableEvtId = editableEvt?.getId(); const editableEvtId = editableEvt?.getId();
if (!editableEvtId) return; if (!editableEvtId) return;
setEditId(editableEvtId);
const editMsgElement = scrollRef.current?.querySelector(
`[data-message-id="${editableEvtId}"]`
) as HTMLElement | null;
if (editMsgElement) {
setEditId(editableEvtId);
}
} }
}, },
[mx, room, editor] [mx, room, editor]