From 8ee4080d69b0cbcb4bd8505ae578d11ce678ce5a Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 12 Jun 2022 12:25:23 +0800 Subject: [PATCH] fix(Popup): should not auto close on deactivated if not using teleport (#10706) --- packages/vant/src/popup/Popup.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vant/src/popup/Popup.tsx b/packages/vant/src/popup/Popup.tsx index ec73d92e8..2095f0042 100644 --- a/packages/vant/src/popup/Popup.tsx +++ b/packages/vant/src/popup/Popup.tsx @@ -264,7 +264,8 @@ export default defineComponent({ }); onDeactivated(() => { - if (props.show) { + // teleported popup should be closed when deactivated + if (props.show && props.teleport) { close(); shouldReopen = true; }