From 8adc347ab68419d66dc9f0aa91af63d13025076b Mon Sep 17 00:00:00 2001 From: sunhao Date: Sat, 10 Aug 2024 18:39:51 +0800 Subject: [PATCH] * popover: fix dismiss button not work in inherit class. --- lib/popover/src/vanilla/popover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/popover/src/vanilla/popover.ts b/lib/popover/src/vanilla/popover.ts index 0e7bb7a953..d1f0f3c982 100644 --- a/lib/popover/src/vanilla/popover.ts +++ b/lib/popover/src/vanilla/popover.ts @@ -595,7 +595,7 @@ $(() => { const clickedPopover = gid ? SHOWN_POPOVERS.get(gid) : null; if (clickedPopover) { const name = clickedPopover.options.name ?? clickedPopover.constructor.ZUI; - if ($target.closest(`[data-dismiss="${name}"]`).length) { + if ($target.closest(`[data-dismiss="popover"],[data-dismiss="${name}"]`).length) { clickedPopover.hide(); return; }