Commit da3e21ce by Valera Rozuvan

Fixed tabbing backwards.

Now you can tab through all of the controls in Video forwards, and then tab backwards.
parent 0a5d261f
...@@ -77,20 +77,25 @@ function () { ...@@ -77,20 +77,25 @@ function () {
$(this).addClass('open'); $(this).addClass('open');
}); });
state.videoVolumeControl.buttonEl.on('focus', function() {
$(this).parent().addClass('open');
});
state.videoVolumeControl.el.on('mouseleave', function() { state.videoVolumeControl.el.on('mouseleave', function() {
$(this).removeClass('open'); $(this).removeClass('open');
}); });
state.videoVolumeControl.buttonEl.on('blur', function() { state.videoVolumeControl.buttonEl.on('blur', function() {
if (state.volumeBlur !== true) {
state.videoVolumeControl.el.addClass('open');
state.videoVolumeControl.volumeSliderEl.find('a').focus(); state.videoVolumeControl.volumeSliderEl.find('a').focus();
} else {
state.volumeBlur = false;
}
}); });
state.videoVolumeControl.volumeSliderEl.find('a').on('blur', function () { state.videoVolumeControl.volumeSliderEl.find('a').on('blur', function () {
state.videoVolumeControl.el.removeClass('open'); state.videoVolumeControl.el.removeClass('open');
state.videoVolumeControl.buttonEl.focus();
state.volumeBlur = true;
}); });
} }
......
...@@ -58,6 +58,8 @@ function () { ...@@ -58,6 +58,8 @@ function () {
); );
}); });
state.videoSpeedControl.videoSpeedsEl.find('a:first').addClass('first_speed_el');
state.videoSpeedControl.setSpeed(state.speed); state.videoSpeedControl.setSpeed(state.speed);
} }
...@@ -89,7 +91,13 @@ function () { ...@@ -89,7 +91,13 @@ function () {
state.videoSpeedControl.el.children('a') state.videoSpeedControl.el.children('a')
.on('focus', function () { .on('focus', function () {
if (state.firstSpeedBlur === true) {
$(this).parent().removeClass('open');
state.firstSpeedBlur = false;
} else {
$(this).parent().addClass('open'); $(this).parent().addClass('open');
}
}) })
.on('blur', function () { .on('blur', function () {
state.videoSpeedControl.videoSpeedsEl state.videoSpeedControl.videoSpeedsEl
...@@ -101,6 +109,16 @@ function () { ...@@ -101,6 +109,16 @@ function () {
.on('blur', function () { .on('blur', function () {
state.videoSpeedControl.el.removeClass('open'); state.videoSpeedControl.el.removeClass('open');
}); });
state.videoSpeedControl.videoSpeedsEl.find('a.speed_link:first')
.on('blur', function () {
state.firstSpeedBlur = true;
});
state.videoSpeedControl.videoSpeedsEl.find('a.speed_link')
.on('focus', function () {
state.firstSpeedBlur = false;
});
} }
} }
...@@ -162,6 +180,10 @@ function () { ...@@ -162,6 +180,10 @@ function () {
_this.videoSpeedControl.videoSpeedsEl.prepend(listItem); _this.videoSpeedControl.videoSpeedsEl.prepend(listItem);
}); });
this.videoSpeedControl.videoSpeedsEl
.find('a:first')
.addClass('first_speed_el');
_bindHandlers(this); _bindHandlers(this);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment