This commit is contained in:
mertsincan 2020-09-28 13:58:09 +03:00
parent a80bdc9498
commit b8a5149718
12 changed files with 49 additions and 58 deletions

View file

@ -93,8 +93,11 @@ export default {
beforeUnmount() {
this.restoreAppend();
this.unbindOutsideClickListener();
this.unbindScrollListener();
this.scrollHandler = null;
if (this.scrollHandler) {
this.scrollHandler.destroy();
this.scrollHandler = null;
}
this.overlay = null;
},
updated() {
@ -355,8 +358,7 @@ export default {
},
bindScrollListener() {
if (!this.scrollHandler) {
const { id } = this.$attrs;
this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, id, () => {
this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, () => {
if (this.overlayVisible) {
this.hide();
}