Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/jumpy-slider'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Hemberger committed Sep 8, 2017
2 parents acd7dcd + c1309da commit c1859ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions assets/js/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@
'role': 'tabpanel',
'id': 'slick-slide' + _.instanceUid + i,
'tabindex': -1
});
});

if (slideControlIndex !== -1) {
$(this).attr({
Expand All @@ -1319,7 +1319,7 @@

_.$dots.attr('role', 'tablist').find('li').each(function(i) {
var mappedSlideIndex = tabControlIndexes[i];

$(this).attr({
'role': 'presentation'
});
Expand Down Expand Up @@ -1366,7 +1366,7 @@
if (_.options.accessibility === true) {
_.$prevArrow.on('keydown.slick', _.keyHandler);
_.$nextArrow.on('keydown.slick', _.keyHandler);
}
}
}

};
Expand Down Expand Up @@ -1686,10 +1686,12 @@

if (_.options.accessibility === true) {
_.initADA();
// for non-autoplay: once active slide (group) has updated, set focus on first newly showing slide
// for non-autoplay: once active slide (group) has updated, set focus on first newly showing slide
if (!_.options.autoplay) {
var $currentSlide = $(_.$slides.get(_.currentSlide));
$currentSlide.attr('tabindex', 0).focus();
var $currentSlide = $(_.$slides.get(_.currentSlide));
var x = window.scrollX, y = window.scrollY;
$currentSlide.attr('tabindex', 0).focus();
window.scrollTo(x, y);
}
}

Expand Down
Loading

0 comments on commit c1859ee

Please sign in to comment.