@@ -85,18 +85,18 @@ export function CommandPalette({ open, onClose, onResetLayout }: CommandPaletteP
8585
8686 const executeItem = useCallback (
8787 ( item : SearchItem ) => {
88- onClose ( ) ;
8988 if ( item . href ) {
89+ onClose ( ) ;
9090 window . open ( item . href , '_blank' , 'noopener,noreferrer' ) ;
9191 return ;
9292 }
9393 if ( item . panelId ) {
9494 openPanel ( item . panelId ) ;
9595 }
9696 if ( item . postAction ) {
97- // Small delay so panel opens before mode switch
9897 requestAnimationFrame ( ( ) => item . postAction ! ( ) ) ;
9998 }
99+ requestAnimationFrame ( ( ) => onClose ( ) ) ;
100100 } ,
101101 [ onClose , openPanel ] ,
102102 ) ;
@@ -245,6 +245,7 @@ export function CommandPalette({ open, onClose, onResetLayout }: CommandPaletteP
245245 cursor : 'pointer' ,
246246 textAlign : 'left' ,
247247 transition : 'background 0.08s ease' ,
248+ position : 'relative' ,
248249 } }
249250 >
250251 { /* Category badge */ }
@@ -261,13 +262,14 @@ export function CommandPalette({ open, onClose, onResetLayout }: CommandPaletteP
261262 background : `color-mix(in srgb, ${ CATEGORY_COLORS [ item . category ] } 15%, transparent)` ,
262263 color : CATEGORY_COLORS [ item . category ] ,
263264 border : `1px solid color-mix(in srgb, ${ CATEGORY_COLORS [ item . category ] } 25%, transparent)` ,
265+ pointerEvents : 'none' as const ,
264266 } }
265267 >
266268 { CATEGORY_LABELS [ item . category ] }
267269 </ span >
268270
269271 { /* Label + description */ }
270- < div style = { { flex : 1 , minWidth : 0 } } >
272+ < div style = { { flex : 1 , minWidth : 0 , pointerEvents : 'none' as const } } >
271273 < div style = { { fontSize : 13 , fontWeight : 500 } } > { item . label } </ div >
272274 < div
273275 style = { {
@@ -294,6 +296,7 @@ export function CommandPalette({ open, onClose, onResetLayout }: CommandPaletteP
294296 border : '1px solid var(--border-color)' ,
295297 borderRadius : 3 ,
296298 color : 'var(--text-muted)' ,
299+ pointerEvents : 'none' as const ,
297300 } }
298301 >
299302 { item . shortcut }
0 commit comments