@deque/cauldron-react 7.1.0-canary.c3383236 → 7.1.0-canary.c367e9d4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +11 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -4323,6 +4323,17 @@ var Combobox = React.forwardRef(function (_a, ref) {
4323
4323
  return value === lastSelectedValue;
4324
4324
  }) || [], 2), element = _a[0], option = _a[1];
4325
4325
  if (autocomplete === 'manual') {
4326
+ // In multiselect, the listbox manages its own active option via
4327
+ // keyboard navigation. When the last-selected value no longer
4328
+ // matches any option (e.g. after deselecting the only selected
4329
+ // option), preserve the existing active descendant so the next
4330
+ // Enter keypress can re-toggle the highlighted option.
4331
+ if (multiselect &&
4332
+ !element &&
4333
+ activeDescendant &&
4334
+ matchingOptions.has(activeDescendant.element)) {
4335
+ return;
4336
+ }
4326
4337
  setActiveDescendant(!element ? null : tslib.__assign({ element: element }, option));
4327
4338
  }
4328
4339
  else if (autocomplete === 'automatic' &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "7.1.0-canary.c3383236",
3
+ "version": "7.1.0-canary.c367e9d4",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Fully accessible react components library for Deque Cauldron",
6
6
  "homepage": "https://cauldron.dequelabs.com/",