1
0
mirror of https://github.com/videojs/video.js.git synced 2025-03-19 21:28:23 +02:00

fix(ie8): various minor ie8 fixes (#4175)

This fixes a logging in the console regarding timetooltips which don't exist. Also, makes sure not to focus the menu button when the captions settings menu item is clicked since the caption settings is getting focused instead. In addition, it makes sure the legend text in the track settings is the foreground color.
This commit is contained in:
Gary Katsevman 2017-03-07 15:44:08 -05:00 committed by GitHub
parent 1770f00018
commit cb890a965c
4 changed files with 16 additions and 3 deletions

View File

@ -19,6 +19,10 @@
overflow: auto;
}
.vjs-tracksettings legend {
color: $primary-foreground-color;
}
.vjs-caption-settings .vjs-tracksettings-colors,
.vjs-caption-settings .vjs-tracksettings-font {
float: left;

View File

@ -52,8 +52,11 @@ class PlayProgressBar extends Component {
this.player_.currentTime();
const content = formatTime(time, this.player_.duration());
const timeTooltip = this.getChild('timeTooltip');
this.getChild('timeTooltip').update(seekBarRect, seekBarPoint, content);
if (timeTooltip) {
timeTooltip.update(seekBarRect, seekBarPoint, content);
}
});
}
}

View File

@ -33,6 +33,8 @@ class CaptionSettingsMenuItem extends TextTrackMenuItem {
// CaptionSettingsMenuItem has no concept of 'selected'
options.selectable = false;
options.name = 'CaptionSettingsMenuItem';
super(player, options);
this.addClass('vjs-texttrack-settings');
this.controlText(', opens ' + options.kind + ' settings dialog');
@ -52,7 +54,6 @@ class CaptionSettingsMenuItem extends TextTrackMenuItem {
handleClick(event) {
this.player().getChild('textTrackSettings').open();
}
}
Component.registerComponent('CaptionSettingsMenuItem', CaptionSettingsMenuItem);

View File

@ -49,7 +49,12 @@ class Menu extends Component {
// Unpress the associated MenuButton, and move focus back to it
if (this.menuButton_) {
this.menuButton_.unpressButton();
this.menuButton_.focus();
// don't focus menu button if item is a caption settings item
// because focus will move elsewhere and it logs an error on IE8
if (component.name() !== 'CaptionSettingsMenuItem') {
this.menuButton_.focus();
}
}
}));
}