Fix pressing crtl/alt key jump to highlighted msg (#344)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
f0e9de4cf9
commit
d25c3ff4fc
1 changed files with 7 additions and 4 deletions
|
@ -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 (
|
||||
|
|
Loading…
Reference in a new issue