You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Include more classes for room list keyboard navigation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@ -55,6 +55,15 @@ interface IState {
|
|||||||
showTagPanel: boolean;
|
showTagPanel: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of CSS classes which should be included in keyboard navigation within the room list
|
||||||
|
const cssClasses = [
|
||||||
|
"mx_RoomSearch_input",
|
||||||
|
"mx_RoomSearch_icon", // minimized <RoomSearch />
|
||||||
|
"mx_RoomSublist2_headerText",
|
||||||
|
"mx_RoomTile2",
|
||||||
|
"mx_RoomSublist2_showNButton",
|
||||||
|
];
|
||||||
|
|
||||||
export default class LeftPanel2 extends React.Component<IProps, IState> {
|
export default class LeftPanel2 extends React.Component<IProps, IState> {
|
||||||
private listContainerRef: React.RefObject<HTMLDivElement> = createRef();
|
private listContainerRef: React.RefObject<HTMLDivElement> = createRef();
|
||||||
private tagPanelWatcherRef: string;
|
private tagPanelWatcherRef: string;
|
||||||
@ -204,10 +213,7 @@ export default class LeftPanel2 extends React.Component<IProps, IState> {
|
|||||||
if (element) {
|
if (element) {
|
||||||
classes = element.classList;
|
classes = element.classList;
|
||||||
}
|
}
|
||||||
} while (element && !(
|
} while (element && !cssClasses.some(c => classes.contains(c)));
|
||||||
classes.contains("mx_RoomTile2") ||
|
|
||||||
classes.contains("mx_RoomSublist2_headerText") ||
|
|
||||||
classes.contains("mx_RoomSearch_input")));
|
|
||||||
|
|
||||||
if (element) {
|
if (element) {
|
||||||
element.focus();
|
element.focus();
|
||||||
|
Reference in New Issue
Block a user