Merge branch 'unmount-noscroll' into 'develop'
Don't hijack scrollbar when status is unmounted, fixes #404 Closes #404 See merge request soapbox-pub/soapbox-fe!221
This commit is contained in:
commit
69cd155c21
1 changed files with 10 additions and 8 deletions
|
@ -151,14 +151,16 @@ class Status extends ImmutablePureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
if (this.node && this.props.getScrollPosition) {
|
// FIXME: Run this code only when a status is being deleted.
|
||||||
const position = this.props.getScrollPosition();
|
//
|
||||||
if (position !== null && this.node.offsetTop < position.top) {
|
// if (this.node && this.props.getScrollPosition) {
|
||||||
requestAnimationFrame(() => {
|
// const position = this.props.getScrollPosition();
|
||||||
this.props.updateScrollBottom(position.height - position.top);
|
// if (position !== null && this.node.offsetTop < position.top) {
|
||||||
});
|
// requestAnimationFrame(() => {
|
||||||
}
|
// this.props.updateScrollBottom(position.height - position.top);
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
handleToggleMediaVisibility = () => {
|
handleToggleMediaVisibility = () => {
|
||||||
|
|
Loading…
Reference in a new issue