This commit is contained in:
Mohit Nagaraj 2024-11-11 10:08:57 +00:00 committed by GitHub
commit 5246683b8d
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() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show the confirm dialog * Show the confirm dialog
@ -58,6 +61,19 @@ export default {
this.$emit("added", this.groupName); this.$emit("added", this.groupName);
this.modal.hide(); 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> </script>

View file

@ -232,6 +232,9 @@ export default {
mounted() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
@ -336,6 +339,20 @@ export default {
}); });
} while (this.$root.notificationList.find(it => it.name === name)); } while (this.$root.notificationList.find(it => it.name === name));
return 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() { mounted() {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show dialog to confirm deletion * 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> </script>

View file

@ -248,6 +248,9 @@ export default {
this.modal = new Modal(this.$refs.modal); this.modal = new Modal(this.$refs.modal);
this.getExistingTags(); this.getExistingTags();
}, },
beforeUnmount() {
this.cleanupModal();
},
methods: { methods: {
/** /**
* Show the add tag dialog * Show the add tag dialog
@ -459,6 +462,19 @@ export default {
this.newTags = []; this.newTags = [];
this.deleteTags = []; this.deleteTags = [];
this.processing = false; 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);
}
}
} }
}, },
}; };