Fix pressing crtl/alt key jump to highlighted msg (#344)

Signed-off-by: Ajay Bura <[email protected]>
This commit is contained in:
Ajay Bura committed 2022-03-11 14:04:44 +05:30
1 parent c9fd8f6efb
commit 5c78ae4e14
1 file changed
+7 -4
+7 -4
View File
@@ -150,10 +150,13 @@ const MessageReplyWrapper = React.memo(({ roomTimeline, eventId }) => {
};
}, []);
const focusReply = () => {
if (reply?.event === null) return;
if (reply?.event.isRedacted()) return;
roomTimeline.loadEventTimeline(eventId);
const focusReply = (ev) => {
if (!ev.keyCode || ev.keyCode === 32 || ev.keyCode === 13) {
if (ev.keyCode) ev.preventDefault();
if (reply?.event === null) return;
if (reply?.event.isRedacted()) return;
roomTimeline.loadEventTimeline(eventId);
}
};
return (