-
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
'Esc' works for a vertical volume bar and menus #6046
'Esc' works for a vertical volume bar and menus #6046
Conversation
sync with origin branch
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.
The switch from :hover to .vjs-hover is also so that if you hover over a non-inline volume control it won't show up, right?
Hi @gkatsev, Yes, exactly. I had the same issue that was recently reported by |
src/js/control-bar/volume-panel.js
Outdated
|
||
/** | ||
* Handles `keydown|keyup` events on the document, looking for ESC, which closes | ||
* the volume panel. |
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.
Looks like a copy/paste issue here.
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.
Thanks, nice catch! I have just fixed the comment.
src/js/control-bar/volume-panel.js
Outdated
*/ | ||
handleKeyPress(event) { | ||
if (keycode.isEventKey(event, 'Esc')) { | ||
this.removeClass('vjs-hover'); |
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.
I think we also need to remove the document
-level listener here?
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.
Thanks, I have just improved the method following your comment.
Description
Following #6004 , this PR adds support for 'Esc' functionality in the volume bar and menus.
Specific Changes proposed
The PR improves player accessibility by adding 'Esc' functionality to the volume panel and menu popups.
Requirements Checklist