Commit 102c8fdc authored by Martin Santangelo's avatar Martin Santangelo

(fix) autoscroll after component is unmounted

1 merge request!372(fix) comment navigation to group should open conversation tab and autoscroll error on unmounted component
......@@ -151,6 +151,7 @@ export default class CommentList extends React.Component<Props, State> {
if (isIOS) {
if (this.focusedChild !== -1) {
setTimeout(() => {
if (!this.listRef) return;
this.listRef.scrollToIndex({
index: this.focusedChild,
viewOffset: this.focusedOffset ? -(this.focusedOffset - (this.height - e.endCoordinates.height - 110)) : -110 ,
......@@ -245,6 +246,7 @@ export default class CommentList extends React.Component<Props, State> {
if (!this.props.parent) {
setTimeout(() => {
if (!this.listRef) return;
this.listRef.scrollToIndex({
index: comments.findIndex(c => item === c),
viewOffset: offset ? -(offset - (this.height - 200)): -110 ,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment