mirror of https://github.com/vector-im/riot-web
Merge pull request #5962 from jaiwanth-v/cleanup-imageview
Add cleanup functions for image viewpull/21833/head
commit
62774d7c16
|
@ -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 = () => {
|
||||
|
|
Loading…
Reference in New Issue