mirror of
https://github.com/videojs/video.js.git
synced 2024-11-28 08:58:46 +02:00
fix: call component dispose in resize manager to fix leak (#5369)
Because we add Touch Activity in the parent class and those don't actually get removed in Resize Manager we leak on every dispose. Calling super.dispose() cleans them up because we remove our list of handlers via a call to DomData.removeData Fixes #5339
This commit is contained in:
parent
db4b89434a
commit
6f072d8e2f
@ -47,7 +47,10 @@ class ResizeManager extends Component {
|
||||
}
|
||||
|
||||
// Only create an element when ResizeObserver isn't available
|
||||
const options_ = mergeOptions({createEl: !RESIZE_OBSERVER_AVAILABLE}, options);
|
||||
const options_ = mergeOptions({
|
||||
createEl: !RESIZE_OBSERVER_AVAILABLE,
|
||||
reportTouchActivity: false
|
||||
}, options);
|
||||
|
||||
super(player, options_);
|
||||
|
||||
@ -115,6 +118,7 @@ class ResizeManager extends Component {
|
||||
this.resizeObserver = null;
|
||||
this.debouncedHandler_ = null;
|
||||
this.loadListener_ = null;
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user