Skip to content

Commit

Permalink
@OwenEdwards fixed links adding extra tab stop with IE by removing an…
Browse files Browse the repository at this point in the history
…chor tags on videojs init. closes #3194
  • Loading branch information
OwenEdwards authored and gkatsev committed Mar 29, 2016
1 parent ba7ec0b commit 0d2d8f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CHANGELOG
* @gkatsev added an option to keep the tooltips inside the player bounds ([view](https://github.com/videojs/video.js/pull/3149))
* @defli added currentWidth and currentHeight methods to the player ([view](https://github.com/videojs/video.js/pull/3144))
* fix IE8 tests for VIDEOJS_NO_DYNAMIC_STYLE ([view](https://github.com/videojs/video.js/pull/3215))
* @OwenEdwards fixed links adding extra tab stop with IE by removing anchor tags on videojs init ([view](https://github.com/videojs/video.js/pull/3194))

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

Expand Down
8 changes: 8 additions & 0 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ class Player extends Component {
this.fluid(this.options_.fluid);
this.aspectRatio(this.options_.aspectRatio);

// Hide any links within the video/audio tag, because IE doesn't hide them completely.
let links = tag.getElementsByTagName('a');
for (let i = 0; i < links.length; i++) {
let linkEl = links.item(i);
Dom.addElClass(linkEl, 'vjs-hidden');
linkEl.setAttribute('hidden', 'hidden');
}

// insertElFirst seems to cause the networkState to flicker from 3 to 2, so
// keep track of the original for later so we can know if the source originally failed
tag.initNetworkState_ = tag.networkState;
Expand Down

0 comments on commit 0d2d8f5

Please sign in to comment.