From c55d9e3ab8a38d10926b0554665d178b92701721 Mon Sep 17 00:00:00 2001 From: froy-clgx Date: Fri, 9 Oct 2026 11:29:47 -0400 Subject: [PATCH] fix(google-maps): avoid inline host style that violates CSP style-src --- src/google-maps/map-info-window/map-info-window.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/google-maps/map-info-window/map-info-window.ts b/src/google-maps/map-info-window/map-info-window.ts index 407c9f3d3fe0..e54261dcb502 100644 --- a/src/google-maps/map-info-window/map-info-window.ts +++ b/src/google-maps/map-info-window/map-info-window.ts @@ -32,7 +32,6 @@ import {MapAnchorPoint} from '../map-anchor-point'; @Directive({ selector: 'map-info-window', exportAs: 'mapInfoWindow', - host: {'style': 'display: none'}, }) export class MapInfoWindow implements OnInit, OnDestroy { private readonly _googleMap = inject(GoogleMap); @@ -104,6 +103,11 @@ export class MapInfoWindow implements OnInit, OnDestroy { @Output() readonly infoWindowInitialized: EventEmitter = new EventEmitter(); + constructor() { + // Set through CSSOM rather than a host style attribute so it isn't blocked by a strict CSP `style-src`. + this._elementRef.nativeElement.style.display = 'none'; + } + ngOnInit() { if (this._googleMap._isBrowser) { this._combineOptions()