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

Commit b568732

Browse files
committed
Fix regression around the room list treeview keyboard a11y
1 parent 146bcdd commit b568732

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/views/rooms/RoomList.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,11 +616,8 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
616616
public focus(): void {
617617
// focus the first focusable element in this aria treeview widget
618618
const treeItems = this.treeRef.current?.querySelectorAll<HTMLElement>('[role="treeitem"]');
619-
if (treeItems) {
620-
return;
621-
}
622-
[...treeItems]
623-
.find(e => e.offsetParent !== null)?.focus();
619+
if (!treeItems) return;
620+
[...treeItems].find(e => e.offsetParent !== null)?.focus();
624621
}
625622

626623
public render() {

0 commit comments

Comments
 (0)