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: Fix an issue where disabling the progress control would throw an error. #4986

Merged
merged 1 commit into from
Mar 5, 2018

Conversation

misteroneill
Copy link
Member

I noticed a small issue when the progress control is disabled, this code throws an error because it gets called without an event object.

@@ -247,7 +247,9 @@ class SeekBar extends Slider {
super.handleMouseUp(event);

// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
if (event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we end up calling this function without an event?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I was trying to find where this could happen but only found cases that pass an event object through, but I guess there's a possibility of it not existing.

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -247,7 +247,9 @@ class SeekBar extends Slider {
super.handleMouseUp(event);

// Stop event propagation to prevent double fire in progress-control.js
event.stopPropagation();
if (event) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I was trying to find where this could happen but only found cases that pass an event object through, but I guess there's a possibility of it not existing.

@gkatsev gkatsev added confirmed patch This PR can be added to a patch release. labels Mar 5, 2018
@gkatsev gkatsev merged commit 5b5cc50 into videojs:master Mar 5, 2018
@misteroneill misteroneill deleted the fix-mup-seekbar branch June 15, 2018 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants