Skip to content

Commit

Permalink
@doublex fixed an issue with IE7 backwards compatibility. closes #1542
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcc authored and heff committed Sep 30, 2014
1 parent 61aee33 commit e526c93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ CHANGELOG
* @chikathreesix fixed an issue where data-setup options could be missed ([view](https://github.com/videojs/video.js/pull/1514))
* @seniorflexdeveloper added new translations and translation updates ([view](https://github.com/videojs/video.js/pull/1530))
* @chikathreesix exported the videojs.Flash.embed method ([view](https://github.com/videojs/video.js/pull/1533))
* @doublex fixed an issue with IE7 backwards compatibility ([view](https://github.com/videojs/video.js/pull/1542))

--------------------

Expand Down
8 changes: 7 additions & 1 deletion src/js/player.js
Expand Up @@ -247,7 +247,13 @@ vjs.Player.prototype.createEl = function(){
// ID will now reference player box, not the video tag
attrs = vjs.getElementAttributes(tag);
vjs.obj.each(attrs, function(attr) {
el.setAttribute(attr, attrs[attr]);
// workaround so we don't totally break IE7
// http://stackoverflow.com/questions/3653444/css-styles-not-applied-on-dynamic-elements-in-internet-explorer-7
if (attr == 'class') {
el.className = attrs[attr];
} else {
el.setAttribute(attr, attrs[attr]);
}
});

// Update tag id/class for use as HTML5 playback tech
Expand Down

0 comments on commit e526c93

Please sign in to comment.