@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.
package/build/index.js CHANGED
@@ -1494,19 +1494,21 @@ function getInitials(name) {
1494
1494
  const FocusBoundary = ({
1495
1495
  children
1496
1496
  }) => {
1497
- return (
1498
- /*#__PURE__*/
1499
- // eslint-disable-next-line jsx-a11y/no-autofocus
1500
- jsxRuntime.jsx(focus.FocusScope, {
1497
+ const wrapperReference = React.useRef(null);
1498
+ React.useEffect(() => {
1499
+ wrapperReference.current?.focus({
1500
+ preventScroll: true
1501
+ });
1502
+ }, []);
1503
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
1504
+ ref: wrapperReference,
1505
+ tabIndex: -1,
1506
+ children: /*#__PURE__*/jsxRuntime.jsx(focus.FocusScope, {
1501
1507
  contain: true,
1502
1508
  restoreFocus: true,
1503
- autoFocus: true,
1504
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
1505
- tabIndex: -1,
1506
- children: children
1507
- })
1509
+ children: children
1508
1510
  })
1509
- );
1511
+ });
1510
1512
  };
1511
1513
  var FocusBoundary$1 = FocusBoundary;
1512
1514