mirror of
https://github.com/videojs/video.js.git
synced 2025-01-19 10:54:16 +02:00
parent
5a5b42f2a7
commit
feb7e26211
@ -2,7 +2,7 @@ CHANGELOG
|
||||
=========
|
||||
|
||||
## HEAD (Unreleased)
|
||||
_(none)_
|
||||
* @gkatsev fixed chapters menu. Fixes #3062 ([view](https://github.com/videojs/video.js/pull/3163))
|
||||
|
||||
--------------------
|
||||
|
||||
|
@ -2,11 +2,6 @@
|
||||
@extend .vjs-icon-chapters;
|
||||
}
|
||||
|
||||
.vjs-chapters-button .vjs-menu {
|
||||
left: -10em; // (Width of vjs-menu - width of vjs-control) / 2
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.vjs-chapters-button .vjs-menu ul {
|
||||
width: 24em;
|
||||
}
|
||||
|
@ -90,11 +90,13 @@ class ChaptersButton extends TextTrackButton {
|
||||
let menu = this.menu;
|
||||
if (menu === undefined) {
|
||||
menu = new Menu(this.player_);
|
||||
menu.contentEl().appendChild(Dom.createEl('li', {
|
||||
let title = Dom.createEl('li', {
|
||||
className: 'vjs-menu-title',
|
||||
innerHTML: toTitleCase(this.kind_),
|
||||
tabIndex: -1
|
||||
}));
|
||||
});
|
||||
menu.children_.unshift(title);
|
||||
Dom.insertElFirst(title, menu.contentEl());
|
||||
}
|
||||
|
||||
if (chaptersTrack && chaptersTrack.cues == null) {
|
||||
|
@ -70,11 +70,13 @@ class MenuButton extends ClickableComponent {
|
||||
|
||||
// Add a title list item to the top
|
||||
if (this.options_.title) {
|
||||
menu.contentEl().appendChild(Dom.createEl('li', {
|
||||
let title = Dom.createEl('li', {
|
||||
className: 'vjs-menu-title',
|
||||
innerHTML: toTitleCase(this.options_.title),
|
||||
tabIndex: -1
|
||||
}));
|
||||
});
|
||||
menu.children_.unshift(title);
|
||||
Dom.insertElFirst(title, menu.contentEl());
|
||||
}
|
||||
|
||||
this.items = this['createItems']();
|
||||
|
Loading…
x
Reference in New Issue
Block a user