mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 11:51:36 +02:00
Add cleanup functions for image view
This commit is contained in:
parent
8dbcc85249
commit
3eea1b8369
@ -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…
x
Reference in New Issue
Block a user