Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
ts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Mar 8, 2024
1 parent d7956f4 commit ef13ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/structures/MessagePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
}
const eventId = event.getId()!;
if (previousEventId && eventId === currentEventId) {
console.log('.mx_EventTile[data-event-id="' + previousEventId + '"]');

document.querySelector('.mx_EventTile[data-event-id="' + previousEventId + '"]')?.focus();
document.querySelector<HTMLElement>('.mx_EventTile[data-event-id="' + previousEventId + '"]')?.focus();
this.focusedEventId = previousEventId;
ev.preventDefault();
return;
Expand Down
4 changes: 1 addition & 3 deletions src/components/views/rooms/SendMessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
const navAction = getKeyBindingsManager().getNavigationAction(event);
switch (navAction) {
case KeyBindingAction.SelectPrevMessage:
(
document.querySelector(".mx_EventTile_selected") || document.querySelector(".mx_EventTile_last")
)?.focus();
document.querySelector<HTMLElement>(".mx_EventTile_selected,.mx_EventTile_last")?.focus();
event.preventDefault();
event.stopPropagation();
return;
Expand Down

0 comments on commit ef13ec5

Please sign in to comment.