code-review-fix task 12.6: remove manual Escape handler from SpanPopover conflicting with Radix Dialog

This commit is contained in:
Marko Djordjevic 2026-02-18 20:39:07 +01:00
parent 6260f7caed
commit 4f2c9756b8

View file

@ -97,17 +97,6 @@ export default function SpanPopover({
onCancel();
};
const handleEscape = (e: KeyboardEvent) => {
if (e.key === 'Escape' && open) {
handleCancel();
}
};
useEffect(() => {
window.addEventListener('keydown', handleEscape);
return () => window.removeEventListener('keydown', handleEscape);
}, [open]);
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="sm:max-w-[425px]">