-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape should close combobox/listbox inside modal without closing mod…
…al (#2610) * fix escape in combobox in dialog: no capture:true in radix esc handler * try making @radix-ui/react-use-escape-keydown an explicit dep * actually the problem was the node cache
- Loading branch information
1 parent
d031c8f
commit 0c873cf
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs b/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs | ||
index 0788d1b..3bb001c 100644 | ||
--- a/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs | ||
+++ b/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs | ||
@@ -9,8 +9,8 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum | ||
onEscapeKeyDown(event); | ||
} | ||
}; | ||
- ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true }); | ||
- return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true }); | ||
+ ownerDocument.addEventListener("keydown", handleKeyDown); | ||
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown); | ||
}, [onEscapeKeyDown, ownerDocument]); | ||
} | ||
export { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters