mirror of
https://github.com/videojs/video.js.git
synced 2025-01-27 11:22:06 +02:00
@mynameisstephen fixed an issue where slider event listeners were not cleaned up. closes #1475
This commit is contained in:
parent
fd181aa9cd
commit
d93bea98d7
@ -4,6 +4,7 @@ CHANGELOG
|
||||
## HEAD (Unreleased)
|
||||
* @deedos added a Brazilian Portuguese translation ([view](https://github.com/videojs/video.js/pull/1520))
|
||||
* @baloneysandwiches added a hasClass method ([view](https://github.com/videojs/video.js/pull/1464))
|
||||
* @mynameisstephen fixed an issue where slider event listeners were not being cleaned up ([view](https://github.com/videojs/video.js/pull/1475))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -34,6 +34,17 @@ vjs.Slider = vjs.Component.extend({
|
||||
}
|
||||
});
|
||||
|
||||
vjs.Slider.prototype.dispose = function() {
|
||||
vjs.off(document, 'mousemove', this.boundEvents.move, false);
|
||||
vjs.off(document, 'mouseup', this.boundEvents.end, false);
|
||||
vjs.off(document, 'touchmove', this.boundEvents.move, false);
|
||||
vjs.off(document, 'touchend', this.boundEvents.end, false);
|
||||
|
||||
vjs.off(document, 'keyup', vjs.bind(this, this.onKeyPress));
|
||||
|
||||
vjs.Component.prototype.dispose.call(this);
|
||||
};
|
||||
|
||||
vjs.Slider.prototype.createEl = function(type, props) {
|
||||
props = props || {};
|
||||
// Add the slider element class to all sub classes
|
||||
|
Loading…
x
Reference in New Issue
Block a user