Hi Abp Zero,
We are having Multi Page Application built with Asp.Net Core and Angular 8 and using abp.notify feature to display messages(set timeout to 5000 ms) throughout the website. When a message is displayed in one page and we route to a different page in less than 5000 ms, we are getting console error(below) and greyout page and unable to perform any action until page refresh. Please help us in handling this behavior and let us know if there is a possibility to close abp.notify messages before the timeout in ngOnDestroy() when switching between components.
Thanks.
ERROR TypeError: Cannot read property 'removeEventListener' of undefined at removePopupAndResetState (scripts.js:33343) at handlePopupAnimation (scripts.js:33417) at SweetAlert.close (scripts.js:33386) at dismissWith (scripts.js:34217) at scripts.js:34278 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:12578) at Object.onInvokeTask (vendor.js:71493) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:12577) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:12350) at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (polyfills.js:12653)
10 Answer(s)
-
0
I am using template version 9.0.1 - Perhaps the way I'm saving isn't correct.
saveButtonClicked() { const PerDto = this.getEditPerDto(); this.showMainSpinner('Saving...'); this._PersServiceProxy .createOrEdit(PerDto) .pipe( finalize(() => { this.hideMainSpinner(); }) ) .subscribe((PerId) => { this.notify.success('Person saved succesfully'); if (this.isNewPer) { this.router.navigate([`../${PerId}`], { relativeTo: this._activatedRoute }); return; } this.loadPerson(PerId); }); }
I would appreciate feedback as this was something that wasn't noticed on my dev environment. I've updated sweetalert2 to version 10.10.0 on the offchance that the bug related to it - however I get the same result. Frozen UI until I refresh the browser.
-
0
-
0
Hi @jtallon,
I have created the issue, please follow https://github.com/aspnetzero/aspnet-zero-core/issues/3610
-
0
Hi @jtallon,
I couldn't reproduce this issue. Normally this line https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/root-routing.module.ts#L26 should hide the visible swal element.
Could you reproduce this on a empty 9.1 project and share it with [email protected] ?
Thanks,