Enabled tabbing to volume slider.

This commit is contained in:
Valera Rozuvan
2013-08-08 14:23:10 +03:00
parent 5380b5cfc3
commit f301231051

View File

@@ -61,10 +61,8 @@ function () {
slide: state.videoVolumeControl.onChange
});
// Make sure that we can't focus the actual volume slider while Tabing.
state.videoVolumeControl.volumeSliderEl.find('a').each(function (index, value) {
$(value).attr('tabindex', '-1');
});
// Make sure that we can focus the actual volume slider while Tabing.
state.videoVolumeControl.volumeSliderEl.find('a').attr('tabindex', '0');
state.videoVolumeControl.el.toggleClass('muted', state.videoVolumeControl.currentVolume === 0);
}
@@ -88,7 +86,11 @@ function () {
});
state.videoVolumeControl.buttonEl.on('blur', function() {
$(this).parent().removeClass('open');
state.videoVolumeControl.volumeSliderEl.find('a').focus();
});
state.videoVolumeControl.volumeSliderEl.find('a').on('blur', function () {
state.videoVolumeControl.el.removeClass('open');
});
}