1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

Merge pull request #5962 from jaiwanth-v/cleanup-imageview

Add cleanup functions for image view
This commit is contained in:
J. Ryan Stinnett
2021-05-05 17:02:43 +01:00
committed by GitHub

View File

@@ -114,6 +114,8 @@ export default class ImageView extends React.Component<IProps, IState> {
componentWillUnmount() {
this.focusLock.current.removeEventListener('wheel', this.onWheel);
window.removeEventListener("resize", this.calculateZoom);
this.image.current.removeEventListener("load", this.calculateZoom);
}
private calculateZoom = () => {