Skip to content

Commit

Permalink
Fix: Resolve page scroll when user selects last item (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-steele authored Aug 8, 2022
1 parent ec58e50 commit f4cf921
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/NarrativeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ class NarrativeView extends ComponentView {
const prevTitle = isAtStart ? '' : this.model.getItem(index - 1).get('title');
const nextTitle = isAtEnd ? '' : this.model.getItem(index + 1).get('title');

$left.toggleClass('u-visibility-hidden', isAtStart);
$right.toggleClass('u-visibility-hidden', isAtEnd);
a11y.toggleEnabled($left, !isAtStart);
a11y.toggleEnabled($right, !isAtEnd);

$left.attr('aria-label', Handlebars.helpers.compile_a11y_normalize(ariaLabelPrevious, {
title: prevTitle,
Expand Down

0 comments on commit f4cf921

Please sign in to comment.