cx 24.11.1 → 24.11.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/dist/manifest.js +631 -631
- package/dist/ui.js +4 -1
- package/package.json +1 -1
- package/src/ui/FocusManager.js +2 -2
package/dist/ui.js
CHANGED
|
@@ -1456,7 +1456,10 @@ function unfocusElement(target, unfocusParentOverlay) {
|
|
|
1456
1456
|
(!unfocusParentOverlay || ((_el$dataset2 = el.dataset) == null ? void 0 : _el$dataset2.focusableOverlayContainer))
|
|
1457
1457
|
);
|
|
1458
1458
|
});
|
|
1459
|
-
if (focusableParent && focusableParent !== document.body)
|
|
1459
|
+
if (focusableParent && focusableParent !== document.body)
|
|
1460
|
+
focusableParent.focus({
|
|
1461
|
+
preventScroll: true,
|
|
1462
|
+
});
|
|
1460
1463
|
else activeElement.blur();
|
|
1461
1464
|
FocusManager.nudge();
|
|
1462
1465
|
}
|
package/package.json
CHANGED
package/src/ui/FocusManager.js
CHANGED
|
@@ -161,10 +161,10 @@ export function unfocusElement(target = null, unfocusParentOverlay = true) {
|
|
|
161
161
|
//find the closest focusable parent of the target element and focus it instead
|
|
162
162
|
let focusableParent = closestParent(
|
|
163
163
|
target,
|
|
164
|
-
(el) => isFocusable(el) && (!unfocusParentOverlay || el.dataset?.focusableOverlayContainer)
|
|
164
|
+
(el) => isFocusable(el) && (!unfocusParentOverlay || el.dataset?.focusableOverlayContainer),
|
|
165
165
|
);
|
|
166
166
|
|
|
167
|
-
if (focusableParent && focusableParent !== document.body) focusableParent.focus();
|
|
167
|
+
if (focusableParent && focusableParent !== document.body) focusableParent.focus({ preventScroll: true });
|
|
168
168
|
else activeElement.blur();
|
|
169
169
|
|
|
170
170
|
FocusManager.nudge();
|