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

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-03-11 14:04:44 +05:30
parent f0e9de4cf9
commit d25c3ff4fc

View file

@ -150,10 +150,13 @@ const MessageReplyWrapper = React.memo(({ roomTimeline, eventId }) => {
}; };
}, []); }, []);
const focusReply = () => { const focusReply = (ev) => {
if (reply?.event === null) return; if (!ev.keyCode || ev.keyCode === 32 || ev.keyCode === 13) {
if (reply?.event.isRedacted()) return; if (ev.keyCode) ev.preventDefault();
roomTimeline.loadEventTimeline(eventId); if (reply?.event === null) return;
if (reply?.event.isRedacted()) return;
roomTimeline.loadEventTimeline(eventId);
}
}; };
return ( return (