@lumx/react 4.24.1-alpha.0 → 4.24.1-alpha.1
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 +10 -4
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -6765,13 +6765,16 @@ function setupCombobox(callbacks, options, onTriggerAttach) {
|
|
|
6765
6765
|
flag = true;
|
|
6766
6766
|
break;
|
|
6767
6767
|
case 'Escape':
|
|
6768
|
-
// 2-tier: close if open, otherwise clear value.
|
|
6768
|
+
// 2-tier: close if open, otherwise clear the input value.
|
|
6769
|
+
// When there is nothing to close or clear, let Escape propagate
|
|
6770
|
+
// (ex: so a surrounding dialog can close).
|
|
6769
6771
|
if (handle.isOpen) {
|
|
6770
6772
|
handle.setIsOpen(false);
|
|
6771
|
-
|
|
6773
|
+
flag = true;
|
|
6774
|
+
} else if (triggerEl.tagName === 'INPUT' && triggerEl.value) {
|
|
6772
6775
|
handle.select(null);
|
|
6776
|
+
flag = true;
|
|
6773
6777
|
}
|
|
6774
|
-
flag = true;
|
|
6775
6778
|
break;
|
|
6776
6779
|
case 'PageUp':
|
|
6777
6780
|
if (handle.isOpen && nav?.selectors.activeItem) {
|
|
@@ -7269,8 +7272,11 @@ function setupComboboxButton(button, callbacks) {
|
|
|
7269
7272
|
// Close if open; never clear selection (button-mode has no text input).
|
|
7270
7273
|
if (combobox.isOpen) {
|
|
7271
7274
|
combobox.setIsOpen(false);
|
|
7275
|
+
return true;
|
|
7272
7276
|
}
|
|
7273
|
-
|
|
7277
|
+
// Closed: let Escape propagate (ex: so a surrounding dialog can close).
|
|
7278
|
+
// The base handler does not clear the selection on a button trigger.
|
|
7279
|
+
return false;
|
|
7274
7280
|
default:
|
|
7275
7281
|
// Printable characters → typeahead.
|
|
7276
7282
|
if (isPrintableKey(event)) {
|