mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-13 17:10:06 +00:00
fix up arrow edit not working sometime
This commit is contained in:
parent
b58983aaa8
commit
9f2789223f
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue