Task attempt 9af44c93-15c6-4877-84c4-ca868be077ea - Final changes
This commit is contained in:
@@ -158,6 +158,22 @@ export function TaskDetailsPanel({
|
||||
const scrollContainerRef = useRef<HTMLDivElement>(null);
|
||||
const { config } = useConfig();
|
||||
|
||||
// Handle ESC key locally to prevent global navigation
|
||||
useEffect(() => {
|
||||
if (!isOpen) return;
|
||||
|
||||
const handleKeyDown = (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('keydown', handleKeyDown, true); // Use capture phase
|
||||
return () => document.removeEventListener('keydown', handleKeyDown, true);
|
||||
}, [isOpen, onClose]);
|
||||
|
||||
// Available executors
|
||||
const availableExecutors = [
|
||||
{ id: "echo", name: "Echo" },
|
||||
|
||||
Reference in New Issue
Block a user