MOBILE-3320 scorm: Fix SCORM disappearing after changing tab
parent
5a528381b2
commit
cab43925a5
|
@ -362,16 +362,6 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Page will leave.
|
||||
*/
|
||||
ionViewWillLeave(): void {
|
||||
CoreEvents.trigger(CoreEvents.ACTIVITY_DATA_SENT, { module: 'scorm' });
|
||||
|
||||
// Empty src when leaving the state so unload event is triggered in the iframe.
|
||||
this.src = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a SCO.
|
||||
*
|
||||
|
@ -547,6 +537,10 @@ export class AddonModScormPlayerPage implements OnInit, OnDestroy {
|
|||
* Component being destroyed.
|
||||
*/
|
||||
ngOnDestroy(): void {
|
||||
// Empty src when leaving the state so unload event is triggered in the iframe.
|
||||
this.src = '';
|
||||
CoreEvents.trigger(CoreEvents.ACTIVITY_DATA_SENT, { module: 'scorm' });
|
||||
|
||||
// Stop listening for events.
|
||||
this.tocObserver?.off();
|
||||
this.launchNextObserver?.off();
|
||||
|
|
Loading…
Reference in New Issue