Skip to content

Commit

Permalink
Merge pull request #8810 from CitizenLabDotCo/TAN-2305-read-more-scro…
Browse files Browse the repository at this point in the history
…ll-behavior

TAN-2305 Prevent scroll when refocussing button
  • Loading branch information
luucvanderzee authored Sep 2, 2024
2 parents b26d12a + f1f4730 commit 5c6966e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion front/app/components/ReadMoreWrapper/ReadMoreWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const ReadMoreWrapper = memo<Props>(
const buttonToFocus = readMoreButton || seeLessButton;
if (buttonToFocus) {
// We move focus to the other button after clicking to make sure the screen reader reads it
buttonToFocus.focus();
buttonToFocus.focus({ preventScroll: true });
}
}, [contentId, expanded]);

Expand Down

0 comments on commit 5c6966e

Please sign in to comment.