mirror of
https://github.com/element-hq/element-web
synced 2024-10-24 03:35:50 +03:00
Merge pull request #5962 from jaiwanth-v/cleanup-imageview
Add cleanup functions for image view
This commit is contained in:
commit
62774d7c16
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue