8000 fix: ensure transient button event listeners are removed on dispose (… · videojs/video.js@0a836e1 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a836e1

Browse files
authored
fix: ensure transient button event listeners are removed on dispose (#8796)
## Description Transient button sets an event listener on the player directly instead of on itself, which doesn't get cleaned up when disposed. Fixes #8795 ## Specific Changes proposed Call `on` on the component with player as the first arg, instead of calling `on` on the player directly. ## Requirements Checklist - [x] Feature implemented / Bug fixed - [ ] If necessary, more likely in a feature request than a bug fix - [x] Change has been verified in an actual browser (Chrome, Firefox, IE) - [ ] Unit Tests updated or fixed - [ ] Docs/guides updated - [ ] Example created ([starter template on JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0)) - [x] Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab) - [x] Has no changes to JSDoc which cause `npm run docs:api` to error - [ ] Reviewed by Two Core Contributors
1 parent 51b4670 commit 0a836e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/transient-button.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class TransientButton extends Button {
5353

5454
// When shown, the float button will be visible even if the user is inactive.
5555
// Clear this if there is any interaction.
56-
player.on(['useractive', 'userinactive'], (e) => {
56+
this.on(this.player_, ['useractive', 'userinactive'], (e) => {
5757
this.removeClass('force-display');
5858
});
5959
}

0 commit comments

Comments
 (0)
0