This commit is contained in:
Mohit Nagaraj 2024-11-12 18:00:25 +00:00 committed by GitHub
commit e5261b754e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 66 additions and 2 deletions

View file

@ -42,6 +42,9 @@ export default {
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeUnmount() {
this.cleanupModal();
},
methods: {
/**
* Show the confirm dialog
@ -58,6 +61,19 @@ export default {
this.$emit("added", this.groupName);
this.modal.hide();
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
},
};
</script>

View file

@ -232,6 +232,9 @@ export default {
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeUnmount() {
this.cleanupModal();
},
methods: {
/**
@ -336,6 +339,20 @@ export default {
});
} while (this.$root.notificationList.find(it => it.name === name));
return name;
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
},
};

View file

@ -125,11 +125,12 @@ export default {
}
};
},
mounted() {
this.modal = new Modal(this.$refs.modal);
},
beforeUnmount() {
this.cleanupModal();
},
methods: {
/**
* Show dialog to confirm deletion
@ -209,6 +210,20 @@ export default {
}
});
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
},
};
</script>

View file

@ -248,6 +248,9 @@ export default {
this.modal = new Modal(this.$refs.modal);
this.getExistingTags();
},
beforeUnmount() {
this.cleanupModal();
},
methods: {
/**
* Show the add tag dialog
@ -459,6 +462,19 @@ export default {
this.newTags = [];
this.deleteTags = [];
this.processing = false;
},
/**
* Clean up modal and restore scroll behavior
* @returns {void}
*/
cleanupModal() {
if (this.modal) {
try {
this.modal.hide();
} catch (e) {
console.warn("Modal hide failed:", e);
}
}
}
},
};