@lumx/react 3.6.7-alpha.7 → 3.6.7
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 +2 -5
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/hooks/useFocusTrap.ts +1 -2
package/index.js
CHANGED
|
@@ -2712,6 +2712,8 @@ function useFocusTrap(focusZoneElement, focusElement) {
|
|
|
2712
2712
|
if (!rootElement || !focusZoneElement) {
|
|
2713
2713
|
return undefined;
|
|
2714
2714
|
}
|
|
2715
|
+
|
|
2716
|
+
// Use the shadow root as focusZoneElement when available
|
|
2715
2717
|
const focusZoneElementOrShadowRoot = focusZoneElement.shadowRoot || focusZoneElement;
|
|
2716
2718
|
|
|
2717
2719
|
// Trap 'Tab' key down focus switch into the focus zone.
|
|
@@ -2730,11 +2732,6 @@ function useFocusTrap(focusZoneElement, focusElement) {
|
|
|
2730
2732
|
return;
|
|
2731
2733
|
}
|
|
2732
2734
|
const activeElement = focusZoneElement.shadowRoot ? focusZoneElement.shadowRoot.activeElement : document.activeElement;
|
|
2733
|
-
console.log('data', {
|
|
2734
|
-
activeElement,
|
|
2735
|
-
focusable,
|
|
2736
|
-
focusZoneElementOrShadowRoot
|
|
2737
|
-
});
|
|
2738
2735
|
if (
|
|
2739
2736
|
// No previous focus
|
|
2740
2737
|
!activeElement ||
|