@mozaic-ds/angular 2.0.24 → 2.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4381,6 +4381,7 @@ const DEFAULT_POPOVER_CONFIG = {
|
|
|
4381
4381
|
class PopoverRef {
|
|
4382
4382
|
overlayRef;
|
|
4383
4383
|
afterClosed$ = new Subject();
|
|
4384
|
+
_closed = false;
|
|
4384
4385
|
constructor(overlayRef) {
|
|
4385
4386
|
this.overlayRef = overlayRef;
|
|
4386
4387
|
this.overlayRef.backdropClick().subscribe(() => this.close());
|
|
@@ -4391,14 +4392,20 @@ class PopoverRef {
|
|
|
4391
4392
|
});
|
|
4392
4393
|
// Fermeture par scrollStrategy ou autre détachement externe
|
|
4393
4394
|
this.overlayRef.detachments().subscribe(() => {
|
|
4394
|
-
this.
|
|
4395
|
-
|
|
4395
|
+
if (!this._closed) {
|
|
4396
|
+
this._closed = true;
|
|
4397
|
+
this.afterClosed$.next(undefined);
|
|
4398
|
+
this.afterClosed$.complete();
|
|
4399
|
+
}
|
|
4396
4400
|
});
|
|
4397
4401
|
}
|
|
4398
4402
|
close(result) {
|
|
4399
|
-
this.
|
|
4403
|
+
if (this._closed)
|
|
4404
|
+
return;
|
|
4405
|
+
this._closed = true;
|
|
4400
4406
|
this.afterClosed$.next(result);
|
|
4401
4407
|
this.afterClosed$.complete();
|
|
4408
|
+
this.overlayRef.dispose();
|
|
4402
4409
|
}
|
|
4403
4410
|
afterClosed() {
|
|
4404
4411
|
return this.afterClosed$.asObservable();
|