Skip to content

Commit

Permalink
fix escape to mark as read (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura authored Sep 8, 2024
1 parent 09444f9 commit 388f606
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/features/room/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { useKeyDown } from '../../hooks/useKeyDown';
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();
Expand All @@ -29,7 +28,7 @@ export function Room() {
window,
useCallback(
(evt) => {
if (isKeyHotkey('escape', evt) && !editableActiveElement()) {
if (isKeyHotkey('escape', evt)) {
markAsRead(mx, room.roomId);
}
},
Expand Down

0 comments on commit 388f606

Please sign in to comment.