@dloizides/ui-layout 1.26.0 → 1.26.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.26.1
4
+
5
+ ### Fixed
6
+
7
+ - **`ModalDropdown` (popover variant) — a CLOSING menu no longer swallows the next keystroke.**
8
+ `InlineMenu` hard-coded `enabled: true` for `useMenuKeyboard`, so its DOCUMENT-CAPTURE keydown
9
+ listener lived as long as the component was MOUNTED — and `ModalDropdown` deliberately keeps it
10
+ mounted past logical close so the exit fade can play. For that whole window the trigger already
11
+ reported `aria-expanded="false"` while a live handler `preventDefault()`ed and
12
+ `stopPropagation()`ed the user's Enter, so react-native-web's `<button>` never received the
13
+ browser-synthesised click and the menu could not be reopened from the keyboard.
14
+
15
+ The menu's keyboard now follows the owner's LOGICAL open state, threaded down as a new required
16
+ `isOpen` prop on `InlineMenu`, rather than its mount. MOUNTED IS NOT OPEN.
17
+
18
+ Note for anyone extending this: passing `menuAnim.mounted` as `isOpen` reproduces the same bug
19
+ one level up, and there is a test that fails if you do.
20
+
21
+
3
22
  ## 1.26.0
4
23
 
5
24
  **New `BuildInfoFooter` — a small, themable "which build am I running?" caption for the portals.**
package/dist/index.js CHANGED
@@ -592,6 +592,7 @@ var InlineMenu = ({
592
592
  value,
593
593
  options,
594
594
  containerRef,
595
+ isOpen,
595
596
  optionTestID,
596
597
  menuMinWidth = 0,
597
598
  animatedStyle,
@@ -623,7 +624,7 @@ var InlineMenu = ({
623
624
  useMenuKeyboard({
624
625
  containerRef,
625
626
  menuRef,
626
- enabled: true,
627
+ enabled: isOpen,
627
628
  itemCount: options.length,
628
629
  onHighlightChange: setHighlightedIndex,
629
630
  onSelectHighlighted: selectHighlighted,
@@ -862,6 +863,7 @@ var ModalDropdown = ({
862
863
  accessibilityLabel,
863
864
  animatedStyle: menuAnim.style,
864
865
  containerRef: anchorRef,
866
+ isOpen,
865
867
  menuMinWidth,
866
868
  optionTestID: optionTestIDFor,
867
869
  options,