New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1877806: Skip updating iframe height when component is unmounted #6585
Bug 1877806: Skip updating iframe height when component is unmounted #6585
Conversation
@rohitkrai03: An error was encountered adding this pull request to the external tracker bugs for bug 1877806 on the Bugzilla server at https://bugzilla.redhat.com:
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/bugzilla refresh |
@rohitkrai03: This pull request references Bugzilla bug 1877806, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
setTimeout(() => { | ||
if (this.unmounted) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to clear the timeout instead.
setTimeout(() => { | |
if (this.unmounted) { | |
return; | |
} | |
this.timeoutHandle = setTimeout(() => { |
in componentWillUnmount
call clearTimeout(this.timeoutHandle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
6c6fd2d
to
c62ab80
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@rohitkrai03: All pull requests linked via external trackers have merged: Bugzilla bug 1877806 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes: https://issues.redhat.com/browse/ODC-4777
Analysis / Root cause: he code in markdown-view component uses
setTimeout
to update the height of the iframe, by quickly going through the steps sometimes the timeout function gets executed after the component has been unmounted. That's why it throws that error.Solution Description: In setTimeout check if component is unmounted and skip setting of height if unmounted.
Browser conformance: