-
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: only change focus from BPB if not a mouse click #4523
Conversation
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 other than one comment
src/js/big-play-button.js
Outdated
if (playPromise) { | ||
playPromise.then(() => playToggle.focus()); | ||
} else { | ||
this.setTimeout(function() { |
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.
maybe store this function since it is used above? or just use the shorthand again?
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.
yeah, might make sense. Ported this from master where it's written this way.
src/js/big-play-button.js
Outdated
this.setTimeout(function() { | ||
playToggle.focus(); | ||
}, 1); | ||
if (playPromise) { |
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.
Should this duck-type the play promise (e.g. if (playPromise && playPromise.then) {
)?
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 was ported over from master, it's probably safer
5.x version of #4497