From 8f09ca0cc3479d2469fd53fe71ac3149945a9c0d Mon Sep 17 00:00:00 2001 From: Md Ashik Date: Tue, 28 Nov 2023 23:44:20 +0600 Subject: [PATCH] fix: #14230 || BlockUI: entire page is blocked if "blocked" input contains true by default --- src/app/components/blockui/blockui.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/components/blockui/blockui.ts b/src/app/components/blockui/blockui.ts index c8e214981d8..352dbb3c87c 100755 --- a/src/app/components/blockui/blockui.ts +++ b/src/app/components/blockui/blockui.ts @@ -80,6 +80,8 @@ export class BlockUI implements AfterViewInit, OnDestroy { constructor(@Inject(DOCUMENT) private document: Document, public el: ElementRef, public cd: ChangeDetectorRef, public config: PrimeNGConfig, private renderer: Renderer2) {} ngAfterViewInit() { + if (this._blocked) this.block(); + if (this.target && !this.target.getBlockableElement) { throw 'Target of BlockUI must implement BlockableUI interface'; }