diff --git a/.yarn/versions/75dcd823.yml b/.yarn/versions/75dcd823.yml new file mode 100644 index 0000000000..913ff0980e --- /dev/null +++ b/.yarn/versions/75dcd823.yml @@ -0,0 +1,18 @@ +releases: + "@radix-ui/react-alert-dialog": patch + "@radix-ui/react-context-menu": patch + "@radix-ui/react-dialog": patch + "@radix-ui/react-dismissable-layer": patch + "@radix-ui/react-dropdown-menu": patch + "@radix-ui/react-hover-card": patch + "@radix-ui/react-menu": patch + "@radix-ui/react-menubar": patch + "@radix-ui/react-navigation-menu": patch + "@radix-ui/react-popover": patch + "@radix-ui/react-select": patch + "@radix-ui/react-toast": patch + "@radix-ui/react-tooltip": patch + "@radix-ui/react-use-escape-keydown": patch + +declined: + - primitives diff --git a/packages/react/use-escape-keydown/src/useEscapeKeydown.tsx b/packages/react/use-escape-keydown/src/useEscapeKeydown.tsx index 67f5594a54..58485d5ecf 100644 --- a/packages/react/use-escape-keydown/src/useEscapeKeydown.tsx +++ b/packages/react/use-escape-keydown/src/useEscapeKeydown.tsx @@ -16,8 +16,8 @@ function useEscapeKeydown( onEscapeKeyDown(event); } }; - ownerDocument.addEventListener('keydown', handleKeyDown); - return () => ownerDocument.removeEventListener('keydown', handleKeyDown); + ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true }); + return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true }); }, [onEscapeKeyDown, ownerDocument]); }