Skip to content

Commit

Permalink
Merge pull request #2037 from Enoooch/confirm-popup
Browse files Browse the repository at this point in the history
fix: align overlay dynamically
  • Loading branch information
tugcekucukoglu authored Mar 28, 2022
2 parents 8b4e56c + 6164ac4 commit 0124a70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/confirmpopup/ConfirmPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default {
this.visible = false;
},
onEnter(el) {
this.alignOverlay();
this.bindOutsideClickListener();
this.bindScrollListener();
this.bindResizeListener();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0124a70

Please sign in to comment.