diff --git a/src/ui/banner/banner.component.ts b/src/ui/banner/banner.component.ts index 1467c912cb80dfe53cf644756ed66fb8bcbf16b6..7d01ae660474042cc060591a62725fd57d8a49d6 100644 --- a/src/ui/banner/banner.component.ts +++ b/src/ui/banner/banner.component.ts @@ -180,6 +180,11 @@ export class AtlasBanner implements OnDestroy{ @HostListener('document:click',['$event']) closeRegion(event:MouseEvent){ + + /* region popover may not always be rendered */ + if(!this.inputRegionPopover) + return + /* FF does not implement event.srcElement so use event.originalTarget to polyfill for FF */ const contains = this.inputRegionPopover.nativeElement.contains(event.srcElement) || this.inputRegionPopover.nativeElement.contains((event as any).originalTarget) if(contains)