import { markAsRead } from '../../../client/action/notifications';
import { useMatrixClient } from '../../hooks/useMatrixClient';
import { useRoomMembers } from '../../hooks/useRoomMembers';
+import { editableActiveElement } from '../../utils/dom';
export function Room() {
const { eventId } = useParams();
window,
useCallback(
(evt) => {
- if (isKeyHotkey('escape', evt)) {
+ if (isKeyHotkey('escape', evt) && !editableActiveElement()) {
markAsRead(mx, room.roomId);
}
},
if (evt.metaKey || evt.altKey || evt.ctrlKey) {
return false;
}
+
// do not focus on F keys
if (/^F\d+$/.test(code)) return false;
code.startsWith('Alt') ||
code.startsWith('Control') ||
code.startsWith('Arrow') ||
+ code.startsWith('Page') ||
+ code.startsWith('End') ||
+ code.startsWith('Home') ||
code === 'Tab' ||
code === 'Space' ||
code === 'Enter' ||