Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): enable modal close on mask click and escape key (#18211)

p0ny8a2cdf90e188
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
index a40b1ab5be..9931bf894b 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RuleEditModal.vue
@@ -1,7 +1,8 @@
<template>
<NModal
:show="show"
- :mask-closable="false"
+ :mask-closable="true"
+ :close-on-esc="true"
@update:show="$emit('update:show', $event)"
>
<div
diff --git a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
index 2417fb19dc..61926c4aad 100644
--- a/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
+++ b/frontend/src/components/CustomApproval/Settings/components/CustomApproval/RulesPanel/RulesSection.vue
@@ -164,6 +164,7 @@ const handleSaveRule = async (ruleData: Partial<LocalApprovalRule>) => {
} else if (editingRule.value && ruleData.uid) {
await store.updateRule(ruleData.uid, ruleData);
}
+ showModal.value = false;
pushNotification({
module: "bytebase",
style: "SUCCESS",