Merge pull request #2037 from Enoooch/confirm-popup

fix: align overlay dynamically
pull/2364/head
Tuğçe Küçükoğlu 2022-03-28 11:47:06 +03:00 committed by GitHub
commit 0124a70bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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);