@jsenv/navi 0.28.7 → 0.28.8
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/dist/jsenv_navi.js +17 -3
- package/dist/jsenv_navi.js.map +4 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -23323,6 +23323,7 @@ const CONTROL_ATTRIBUTE_SET = new Set([
|
|
|
23323
23323
|
"command",
|
|
23324
23324
|
"commandFor",
|
|
23325
23325
|
"command-value", // not standard but make sense, allow to give param to the command in question
|
|
23326
|
+
"list",
|
|
23326
23327
|
|
|
23327
23328
|
// "ui-action-target",
|
|
23328
23329
|
"navi-input-type",
|
|
@@ -31229,6 +31230,11 @@ const generateCrossPlatformCombination = (combination) => {
|
|
|
31229
31230
|
return crossPlatform;
|
|
31230
31231
|
};
|
|
31231
31232
|
const keyboardEventIsMatchingKeyCombination = (event, keyCombination) => {
|
|
31233
|
+
if (!event.key) {
|
|
31234
|
+
// Some keydown events carry no key at all — the browser synthesizes one
|
|
31235
|
+
// when a native autofill/search suggestion is clicked. No key, no match.
|
|
31236
|
+
return false;
|
|
31237
|
+
}
|
|
31232
31238
|
const keys = keyCombination.toLowerCase().split("+");
|
|
31233
31239
|
const activeModifiers = new Set();
|
|
31234
31240
|
for (const eventProperty of Object.keys(modifierKeyMapping)) {
|
|
@@ -41485,7 +41491,10 @@ const css$y = /* css */`
|
|
|
41485
41491
|
* @param {boolean|"last-resort"|"restore"} [props.autoFocus="last-resort"] - See
|
|
41486
41492
|
* `focus_transfer.js` — `"last-resort"` focuses the popover itself only if it
|
|
41487
41493
|
* has no other focusable descendant, `"restore"` keeps it out of the
|
|
41488
|
-
* opening focus chain unless it held focus when the popover closed.
|
|
41494
|
+
* opening focus chain unless it held focus when the popover closed. `false`
|
|
41495
|
+
* disables the open-time focus transfer entirely: nothing inside the popover
|
|
41496
|
+
* receives focus, whoever had the keyboard keeps it — the combobox case,
|
|
41497
|
+
* where suggestions open under an input being typed in.
|
|
41489
41498
|
* @param {boolean} [props.open] - Controlled open state.
|
|
41490
41499
|
* @param {boolean} [props.defaultOpen] - Uncontrolled, mount-only initial
|
|
41491
41500
|
* open state — plays no entrance animation (nothing was ever shown as
|
|
@@ -42190,7 +42199,12 @@ const usePopoverProps = props => {
|
|
|
42190
42199
|
}
|
|
42191
42200
|
}
|
|
42192
42201
|
const cancelOpenInteractionSuppression = !silent && hasCssTransitionAnimation ? suppressPointerEventsDuringTransition(popoverEl) : null;
|
|
42193
|
-
|
|
42202
|
+
// autoFocus={false}: opening moves no focus at all — whoever has the
|
|
42203
|
+
// keyboard keeps it (combobox-style suggestions under an input being
|
|
42204
|
+
// typed in). The element-level useAutoFocus hook is already a no-op for
|
|
42205
|
+
// false; this skips the open transfer too, and with no transfer there is
|
|
42206
|
+
// nothing to restore on close.
|
|
42207
|
+
const restoreFocus = autoFocus === false ? null : openController.transferFocusOnOpen(popoverEl);
|
|
42194
42208
|
debugPopup(e, isTopLayer ? `openPopover() -> anchor: ${anchorElement?.tagName}, hasAnchorElement: ${hasAnchorElement}` : `openPopover() -> scroll-container (local)`);
|
|
42195
42209
|
|
|
42196
42210
|
// The close callback openEffect returns — also inlined for the same
|
|
@@ -42228,7 +42242,7 @@ const usePopoverProps = props => {
|
|
|
42228
42242
|
}
|
|
42229
42243
|
});
|
|
42230
42244
|
}
|
|
42231
|
-
restoreFocus(closeEvent);
|
|
42245
|
+
restoreFocus?.(closeEvent);
|
|
42232
42246
|
|
|
42233
42247
|
// pickPositionRelativeTo (visible_rect.js) writes data-position-y/x-
|
|
42234
42248
|
// current unconditionally on every call, and treats their mere
|