File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
LearningHub.Nhs.WebUI/Scripts/vuesrc/resource Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 288288 return questionBlockOrder - pageBreakOrder - 1 ;
289289 },
290290 setQuestionInFocus(pageIndex : number , value : number , remove : boolean ) {
291- if ((remove && this .questionsInFocus [pageIndex ] === value ) || this . canContinue ) {
291+ if ((remove && this .questionsInFocus [pageIndex ] === value )) {
292292 this .questionsInFocus [pageIndex ] = undefined ;
293293 } else {
294294 this .questionsInFocus [pageIndex ] = value ;
Original file line number Diff line number Diff line change 9393 requestAnimationFrame (this .applyUpdates );
9494 },
9595 questionInFocus() {
96- const question = this .blocks [this .questionInFocus ] ;
97- if (question && this . allQuestionsAnswered ) {
98- const element = document .getElementById (this .generateId (question . order - this . blocks [ 0 ]. order ));
96+ const lastAnsweredIndex = this .blocks . findIndex ( block => block . blockType === BlockTypeEnum . Question && this . pagesProgress [this .blocks . indexOf ( block )]) ;
97+ if (lastAnsweredIndex !== - 1 ) {
98+ const element = document .getElementById (this .generateId (lastAnsweredIndex ));
9999 if (element ) {
100100 setTimeout (() => {
101101 element .scrollIntoView ({ behavior: " smooth" });
You can’t perform that action at this time.
0 commit comments