From b0e1a6ca0d0320a0d4dd7825d5ecd14d22f95c07 Mon Sep 17 00:00:00 2001 From: dianeCdrPix Date: Mon, 18 Nov 2024 17:18:14 +0100 Subject: [PATCH] feat(mon-pix): scroll to flashcards when self-assesment --- .../app/components/module/element/flashcards/flashcards.gjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mon-pix/app/components/module/element/flashcards/flashcards.gjs b/mon-pix/app/components/module/element/flashcards/flashcards.gjs index b90de0d3a34..ceb8719a52d 100644 --- a/mon-pix/app/components/module/element/flashcards/flashcards.gjs +++ b/mon-pix/app/components/module/element/flashcards/flashcards.gjs @@ -111,6 +111,9 @@ export default class ModulixFlashcards extends Component { this.args.onSelfAssessment(selfAssessmentData); this.incrementCounterFor(userAssessment); this.goToNextCard(); + + const elementToFocus = document.querySelector('.element-flashcards'); + elementToFocus.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'start' }); }