Merge pull request #2290 from dpalou/MOBILE-3323
MOBILE-3323 quiz: Fix nativeElement error when submit quizmain
commit
8351526585
|
@ -154,7 +154,9 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
|
||||||
|
|
||||||
await this.domUtils.showConfirm(this.translate.instant('addon.mod_quiz.confirmleavequizonerror'));
|
await this.domUtils.showConfirm(this.translate.instant('addon.mod_quiz.confirmleavequizonerror'));
|
||||||
|
|
||||||
this.domUtils.triggerFormCancelledEvent(this.formElement.nativeElement, this.sitesProvider.getCurrentSiteId());
|
if (this.formElement) {
|
||||||
|
this.domUtils.triggerFormCancelledEvent(this.formElement.nativeElement, this.sitesProvider.getCurrentSiteId());
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
modal.dismiss();
|
modal.dismiss();
|
||||||
}
|
}
|
||||||
|
@ -589,8 +591,10 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy {
|
||||||
this.autoSave.cancelAutoSave();
|
this.autoSave.cancelAutoSave();
|
||||||
this.autoSave.hideAutoSaveError();
|
this.autoSave.hideAutoSaveError();
|
||||||
|
|
||||||
this.domUtils.triggerFormSubmittedEvent(this.formElement.nativeElement, !this.offline,
|
if (this.formElement) {
|
||||||
this.sitesProvider.getCurrentSiteId());
|
this.domUtils.triggerFormSubmittedEvent(this.formElement.nativeElement, !this.offline,
|
||||||
|
this.sitesProvider.getCurrentSiteId());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue