actual/patches/@reach+listbox+0.11.2.patch

23 lines
853 B
Diff
Raw Normal View History

2022-04-29 02:44:38 +00:00
diff --git a/node_modules/@reach/listbox/dist/listbox.esm.js b/node_modules/@reach/listbox/dist/listbox.esm.js
index 7f1a1f3..bdce79f 100644
--- a/node_modules/@reach/listbox/dist/listbox.esm.js
+++ b/node_modules/@reach/listbox/dist/listbox.esm.js
@@ -1485,6 +1485,7 @@ function useKeyDown() {
_useContext9$stateDat = _useContext9.stateData,
navigationValue = _useContext9$stateDat.navigationValue,
typeaheadQuery = _useContext9$stateDat.typeaheadQuery,
+ state = _useContext9.state,
send = _useContext9.send;
var options = useDescendants(ListboxDescendantContext);
@@ -1541,6 +1542,9 @@ function useKeyDown() {
return;
case "Escape":
+ if(isListboxExpanded(state)) {
+ event.stopPropagation();
+ }
send({
type: ListboxEvents.KeyDownEscape
});