Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ensure transient button event listeners are removed on dispose #8796

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

mister-ben
Copy link
Contributor

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

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • 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)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.68%. Comparing base (51b4670) to head (00f8431).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8796      +/-   ##
==========================================
- Coverage   83.75%   83.68%   -0.08%     
==========================================
  Files         120      120              
  Lines        8022     8022              
  Branches     1925     1925              
==========================================
- Hits         6719     6713       -6     
- Misses       1303     1309       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mister-ben mister-ben added the patch This PR can be added to a patch release. label Jul 12, 2024
@mister-ben mister-ben merged commit 0a836e1 into videojs:main Jul 14, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TransientButton: WARN: removeClass was called with an element that doesn't exist
2 participants