message: fix: modal focus - v3 modal focus behaviour on web
diff: -import React from 'react';
  +import React, { RefObject, useEffect, ReactNode } from 'react';
  import type { Modal as ModalType } from 'react-native';
  import {
  KeyboardAvoidingView,
  @@ -10,6 +10,7 @@ import styled from 'styled-components/native';
  import { border, color, flexbox, layout, position, space } from 'styled-system';
  import { useOverlay } from '../../../core/Overlay';
  import { useThemeProps } from '../../../hooks';
  +import { FocusScope } from '@react-aria/focus';
  import {
  customBackground,
  customBorder,
  @@ -61,6 +62,26 @@ const ModalContext = React.createContext({
  },
  });
  +const ModalWeb = ({
  + initialFocusRef,
  + finalFocusRef,
  + children,
  +}: {
  + initialFocusRef?: RefObject<any>;
  + finalFocusRef?: RefObject<any>;
  + children: ReactNode;
  +}): any => {
  + useEffect(() => {
  + initialFocusRef?.current?.focus();
  + const finalRef = finalFocusRef?.current;
  + return () => {
  + finalRef?.focus();
  + };
  + }, [initialFocusRef, finalFocusRef]);
  +
  + return children;
  +};
  +
  const Modal = (
  {
  children,
  @@ -107,9 +128,20 @@ const Modal = (
  isOpen && Platform.OS === 'web'
  ? setOverlay(
  <ModalContext.Provider value={value}>
  + <FocusScope
  + contain
  + restoreFocus={!(finalFocusRef && finalFocusRef.current)}
  + autoFocus={!(initialFocusRef && initialFocusRef.current)}
  + >
  <Box ref={ref} nativeID={id} h="100%">
  + <ModalWeb
  + initialFocusRef={initialFocusRef}
  + finalFocusRef={finalFocusRef}
  + >
  {modalChildren}
  + </ModalWeb>
  </Box>
  + </FocusScope>
  </ModalContext.Provider>,
  {
  onClose: onClose,
  