-
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
Making sure that the title element gets placed into the UL element #1114
Conversation
Cool, thanks! |
}); | ||
|
||
var menuContentElement = menuButton.el().getElementsByTagName('UL')[0]; | ||
var titleElement = menuContentElement.getElementsByClassName( |
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'll need to use something other than getElementsByClassName to get tests to pass in IE8.
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 can probably iterate over the children, the first one should be the one we want
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, that'd work.
Included are two sanity check tests for the two areas being checked to make sure that the menu title items are being correctly placed in the actual UL element of the menu. Fixes videojs#1107
@heff updated to use the |
@@ -129,7 +129,7 @@ vjs.MenuButton.prototype.createMenu = function(){ | |||
|
|||
// Add a title list item to the top | |||
if (this.options().title) { | |||
menu.el().appendChild(vjs.createEl('li', { | |||
menu.contentEl().appendChild(vjs.createEl('li', { | |||
className: 'vjs-menu-title', | |||
innerHTML: vjs.capitalize(this.kind_), |
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 found some other related issues after pulling this in. For instance, this.kind_
here should really be this.options().title. Kind must have gotten copied over from tracks at some point.
Included are two sanity check tests for the two areas being checked
to make sure that the menu title items are being correctly placed
in the actual UL element of the menu.
Fixes #1107