From 6164ac4601fa72db694f7dbd103280a517fbbc55 Mon Sep 17 00:00:00 2001 From: Enoooch Date: Fri, 21 Jan 2022 14:21:50 +0800 Subject: [PATCH] fix: align overlay dynamically --- src/components/confirmpopup/ConfirmPopup.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/confirmpopup/ConfirmPopup.vue b/src/components/confirmpopup/ConfirmPopup.vue index 0ea94e73a..d81f21128 100644 --- a/src/components/confirmpopup/ConfirmPopup.vue +++ b/src/components/confirmpopup/ConfirmPopup.vue @@ -97,7 +97,6 @@ export default { this.visible = false; }, onEnter(el) { - this.alignOverlay(); this.bindOutsideClickListener(); this.bindScrollListener(); this.bindResizeListener(); @@ -133,6 +132,8 @@ export default { this.outsideClickListener = (event) => { if (this.visible && this.container && !this.container.contains(event.target) && !this.isTargetClicked(event)) { this.visible = false; + } else { + this.alignOverlay(); } }; document.addEventListener('click', this.outsideClickListener);