1
0
mirror of https://github.com/videojs/video.js.git synced 2024-11-24 08:42:25 +02:00

@gkatsev fixed keyboard control of menus with titles. Fixes #3164. closes #3165

This commit is contained in:
Gary Katsevman 2016-03-10 13:59:31 -05:00
parent 3367b007a2
commit 8cc633edc4
2 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,7 @@ CHANGELOG
=========
## HEAD (Unreleased)
_(none)_
* @gkatsev fixed keyboard control of menus with titles. Fixes #3164 ([view](https://github.com/videojs/video.js/pull/3165))
--------------------

View File

@ -117,7 +117,14 @@ class Menu extends Component {
* @method focus
*/
focus (item = 0) {
let children = this.children();
let children = this.children().slice();
let haveTitle = children[0].className &&
/vjs-menu-title/.test(children[0].className);
if (haveTitle) {
children.shift();
}
if (children.length > 0) {
if (item < 0) {