@transferwise/components 0.0.0-experimental-e9526a8 → 0.0.0-experimental-d05d921

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.
@@ -1461,19 +1461,21 @@ function getInitials(name) {
1461
1461
  const FocusBoundary = ({
1462
1462
  children
1463
1463
  }) => {
1464
- return (
1465
- /*#__PURE__*/
1466
- // eslint-disable-next-line jsx-a11y/no-autofocus
1467
- jsx(FocusScope, {
1464
+ const wrapperReference = useRef(null);
1465
+ useEffect(() => {
1466
+ wrapperReference.current?.focus({
1467
+ preventScroll: true
1468
+ });
1469
+ }, []);
1470
+ return /*#__PURE__*/jsx("div", {
1471
+ ref: wrapperReference,
1472
+ tabIndex: -1,
1473
+ children: /*#__PURE__*/jsx(FocusScope, {
1468
1474
  contain: true,
1469
1475
  restoreFocus: true,
1470
- autoFocus: true,
1471
- children: /*#__PURE__*/jsx("div", {
1472
- tabIndex: -1,
1473
- children: children
1474
- })
1476
+ children: children
1475
1477
  })
1476
- );
1478
+ });
1477
1479
  };
1478
1480
  var FocusBoundary$1 = FocusBoundary;
1479
1481