react-magma-dom 4.7.0-next.11 → 4.7.0-next.12

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.
@@ -6589,9 +6589,13 @@ var HelperInformation = function HelperInformation(props) {
6589
6589
  function useFocusLock(active, header, body) {
6590
6590
  var rootNode = React.useRef(null);
6591
6591
  var focusableItems = React.useRef([]);
6592
+ // The filter is necessary for the proper functioning of focus in drawer-navigation or similar cases
6592
6593
  var updateFocusableItems = function updateFocusableItems() {
6593
6594
  var _rootNode$current;
6594
- focusableItems.current = Array.from(((_rootNode$current = rootNode.current) == null ? void 0 : _rootNode$current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), video')) || []);
6595
+ focusableItems.current = Array.from(((_rootNode$current = rootNode.current) == null ? void 0 : _rootNode$current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), video')) || []).filter(function (element) {
6596
+ var style = window.getComputedStyle(element);
6597
+ return element instanceof HTMLElement && style.display !== 'none' && style.visibility !== 'hidden';
6598
+ });
6595
6599
  };
6596
6600
  React.useEffect(function () {
6597
6601
  if (active) {