From cb4719eae0ef9725d0fd71a1ccb0595476aed9a2 Mon Sep 17 00:00:00 2001 From: mark7p Date: Wed, 1 Jan 2025 03:25:07 +0800 Subject: [PATCH] fixed mask zIndex calculation --- packages/primeng/src/drawer/drawer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/primeng/src/drawer/drawer.ts b/packages/primeng/src/drawer/drawer.ts index 9a4fc14e09d..00ee0b7ec60 100755 --- a/packages/primeng/src/drawer/drawer.ts +++ b/packages/primeng/src/drawer/drawer.ts @@ -389,7 +389,7 @@ export class Drawer extends BaseComponent implements AfterViewInit, AfterContent enableModality() { const activeDrawers = this.document.querySelectorAll('.p-drawer-active'); const activeDrawersLength = activeDrawers.length; - const zIndex = activeDrawersLength == 1 ? String(parseInt((this.container as HTMLDivElement).style.zIndex) - 1) : String(parseInt((activeDrawers[0] as HTMLElement).style.zIndex) - 1); + const zIndex = activeDrawersLength == 1 ? String(parseInt((this.container as HTMLDivElement).style.zIndex) - 1) : String(parseInt((activeDrawers[activeDrawersLength - 1] as HTMLElement).style.zIndex) - 1); this.container.setAttribute(this.attrSelector, ''); if (!this.mask) {