code-review-fix task 12.6: remove manual Escape handler from SpanPopover conflicting with Radix Dialog
This commit is contained in:
parent
6260f7caed
commit
4f2c9756b8
1 changed files with 0 additions and 11 deletions
|
|
@ -97,17 +97,6 @@ export default function SpanPopover({
|
||||||
onCancel();
|
onCancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEscape = (e: KeyboardEvent) => {
|
|
||||||
if (e.key === 'Escape' && open) {
|
|
||||||
handleCancel();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
window.addEventListener('keydown', handleEscape);
|
|
||||||
return () => window.removeEventListener('keydown', handleEscape);
|
|
||||||
}, [open]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||||
<DialogContent className="sm:max-w-[425px]">
|
<DialogContent className="sm:max-w-[425px]">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue