Skip to content
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

Merged
merged 1 commit into from
Apr 3, 2014

Conversation

jnwng
Copy link
Contributor

@jnwng jnwng commented Mar 26, 2014

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

@heff
Copy link
Member

heff commented Mar 26, 2014

Cool, thanks!

});

var menuContentElement = menuButton.el().getElementsByTagName('UL')[0];
var titleElement = menuContentElement.getElementsByClassName(
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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
@jnwng
Copy link
Contributor Author

jnwng commented Apr 2, 2014

@heff updated to use the children property for the sake of ie8.

@heff heff merged commit c7e35e5 into videojs:master Apr 3, 2014
@@ -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_),
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu title LI created outside UL
2 participants