diff --git a/src/lib/commandCenter/commands.ts b/src/lib/commandCenter/commands.ts
index b174bc6ec0..64d3ea0c9f 100644
--- a/src/lib/commandCenter/commands.ts
+++ b/src/lib/commandCenter/commands.ts
@@ -29,7 +29,8 @@ const groups = [
'teams',
'security',
'buckets',
- 'files'
+ 'files',
+ 'misc'
] as const;
export type CommandGroup = (typeof groups)[number];
@@ -278,8 +279,9 @@ export const commandGroupRanks = derived(groupRanksMap, ($groupRankTransformatio
databases: 3,
users: 2,
teams: 1,
- navigation: -1,
- help: -2
+ navigation: -10,
+ help: -20,
+ misc: -30
} as CommandGroupRanks;
const transformations = Array.from($groupRankTransformations.values());
diff --git a/src/lib/components/drop.svelte b/src/lib/components/drop.svelte
index 600700a36a..ca65fb4e33 100644
--- a/src/lib/components/drop.svelte
+++ b/src/lib/components/drop.svelte
@@ -77,16 +77,26 @@
event.target === element ||
element.contains(event.target as Node) ||
event.target === tooltip ||
- tooltip.contains(event.target as Node)
+ tooltip.contains(event.target as Node) ||
+ // Avoid deleted elements triggering blur
+ !document.body.contains(event.target as Node)
)
) {
show = false;
dispatch('blur');
}
};
+
+ const onKeyDown = (event: KeyboardEvent) => {
+ if (event.key === 'Escape' && show) {
+ event.preventDefault();
+ show = false;
+ dispatch('blur');
+ }
+ };
-