Skip to content

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

fix(frontend): 🔥 bb-modal swallowed all keyboard events (#1161)

Liu Ji692bb43829f6
diff --git a/frontend/src/bbkit/BBModal.vue b/frontend/src/bbkit/BBModal.vue
index 034755cd83..79d9e1ae6f 100644
--- a/frontend/src/bbkit/BBModal.vue
+++ b/frontend/src/bbkit/BBModal.vue
@@ -72,16 +72,17 @@ export default defineComponent({
};
const escHandler = (e: KeyboardEvent) => {
- e.preventDefault();
- e.stopPropagation();
- if (!props.escClosable) {
- return;
- }
- if (!active.value) {
- // only to close the topmost modal when pressing ESC
- return;
- }
if (e.code == "Escape") {
+ e.preventDefault();
+ e.stopPropagation();
+
+ if (!props.escClosable) {
+ return;
+ }
+ if (!active.value) {
+ // only to close the topmost modal when pressing ESC
+ return;
+ }
close();
}
};