Maintain scroll positions when switching tabs
This commit is contained in:
parent
45c61e7596
commit
52acec9d21
4 changed files with 81 additions and 29 deletions
|
@ -28,7 +28,7 @@ function updateSelected({ params, dispatch }) {
|
|||
}
|
||||
|
||||
function updateCharWidth() {
|
||||
const charWidth = stringWidth(' ', '16px Roboto Mono');
|
||||
const charWidth = stringWidth(' ', '16px Roboto Mono, monospace');
|
||||
window.messageIndent = 6 * charWidth;
|
||||
return setCharWidth(charWidth);
|
||||
}
|
||||
|
@ -38,9 +38,6 @@ class Chat extends PureComponent {
|
|||
const { dispatch } = this.props;
|
||||
dispatch(updateCharWidth());
|
||||
setTimeout(() => dispatch(updateCharWidth()), 1000);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
updateSelected(this.props);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue