toodego: a11y, stop autorefresh when a carrousel arrow gets focus (#34675)

This commit is contained in:
Frédéric Péters 2019-07-11 10:12:58 +02:00
parent d2d946cc4d
commit c68621c8b1
1 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,12 @@ $(function() {
}
return false;
});
$('a.carrousel-left, a.carrousel-right').on('focus', function() {
// stop autorefresh when an arrow gets focus, so it can be navigated with
// a keyboard more easily.
clearInterval(timeout_id);
return false;
});
$('a.carrousel-left').on('click', function() {
clearInterval(timeout_id);
previous();