-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Conversation
@@ -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) { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.handleMouseUp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And then:
seekBar.handleMouseUp(event); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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.
I noticed a small issue when the progress control is disabled, this code throws an error because it gets called without an event object.