@lumx/react 4.13.0-next.1 → 4.13.0-next.2

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.
package/index.js CHANGED
@@ -6622,11 +6622,14 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
6622
6622
  if (!handle.isMultiSelect && !isActionCell(activeItem)) {
6623
6623
  handle.setIsOpen(false);
6624
6624
  }
6625
- } else if (!handle.isMultiSelect) {
6626
- // No active item toggle open/close.
6627
- handle.setIsOpen(!handle.isOpen);
6625
+ flag = true;
6626
+ } else if (handle.isOpen && !handle.isMultiSelect) {
6627
+ // Open with no active item (single select) => close the popup.
6628
+ handle.setIsOpen(false);
6629
+ flag = true;
6628
6630
  }
6629
- flag = true;
6631
+ // Otherwise (closed popup, or multi-select with no active item),
6632
+ // let Enter pass through so it can submit a surrounding form
6630
6633
  break;
6631
6634
  case 'ArrowDown':
6632
6635
  if (nav?.hasNavigableItems) {