You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Fix show-all keyboard focus regression
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -237,10 +237,13 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private onShowAllClick = () => {
|
private onShowAllClick = () => {
|
||||||
|
// read number of visible tiles before we mutate it
|
||||||
|
const numVisibleTiles = this.numVisibleTiles;
|
||||||
const newHeight = this.layout.tilesToPixelsWithPadding(this.numTiles, this.padding);
|
const newHeight = this.layout.tilesToPixelsWithPadding(this.numTiles, this.padding);
|
||||||
this.applyHeightChange(newHeight);
|
this.applyHeightChange(newHeight);
|
||||||
this.setState({height: newHeight}, () => {
|
this.setState({height: newHeight}, () => {
|
||||||
this.focusRoomTile(this.numTiles - 1);
|
// focus the top-most new room
|
||||||
|
this.focusRoomTile(numVisibleTiles);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user