Fix show-all keyboard focus regression

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2020-07-14 09:38:31 +01:00
parent 126aa862db
commit 03f94779f1
1 changed files with 4 additions and 1 deletions

View File

@ -237,10 +237,13 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
};
private onShowAllClick = () => {
// read number of visible tiles before we mutate it
const numVisibleTiles = this.numVisibleTiles;
const newHeight = this.layout.tilesToPixelsWithPadding(this.numTiles, this.padding);
this.applyHeightChange(newHeight);
this.setState({height: newHeight}, () => {
this.focusRoomTile(this.numTiles - 1);
// focus the top-most new room
this.focusRoomTile(numVisibleTiles);
});
};