|
|
@ -134,6 +134,16 @@ export default class Status extends ImmutablePureComponent {
|
|
|
|
componentDidMount () {
|
|
|
|
componentDidMount () {
|
|
|
|
attachFullscreenListener(this.onFullScreenChange);
|
|
|
|
attachFullscreenListener(this.onFullScreenChange);
|
|
|
|
this.props.dispatch(fetchStatus(this.props.params.statusId));
|
|
|
|
this.props.dispatch(fetchStatus(this.props.params.statusId));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { status, ancestorsIds } = this.props;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status && ancestorsIds && ancestorsIds.size > 0) {
|
|
|
|
|
|
|
|
const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.requestAnimationFrame(() => {
|
|
|
|
|
|
|
|
element.scrollIntoView(true);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static getDerivedStateFromProps(props, state) {
|
|
|
|
static getDerivedStateFromProps(props, state) {
|
|
|
|