We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b11a4e commit 2f0834fCopy full SHA for 2f0834f
src/js/menu/menu-button.js
@@ -108,16 +108,17 @@ class MenuButton extends Component {
108
109
// Add a title list item to the top
110
if (this.options_.title) {
111
- const title = Dom.createEl('li', {
+ const titleEl = Dom.createEl('li', {
112
className: 'vjs-menu-title',
113
innerHTML: toTitleCase(this.options_.title),
114
tabIndex: -1
115
});
116
117
this.hideThreshold_ += 1;
118
119
- menu.children_.unshift(title);
120
- Dom.prependTo(title, menu.contentEl());
+ const titleComponent = new Component(this.player_, {el: titleEl});
+
121
+ menu.addItem(titleComponent);
122
}
123
124
this.items = this.createItems();
0 commit comments