We use a two-phase activation pattern for Modal (mount with active={false}, then switch to active={true} via useEffect) because in the past focus trap didn't work correctly when Modal was mounted with active={true} directly. This issue might already be fixed, but even with two-phase activation the scroll jump shouldn't happen.
Bug: When opening a DropdownMenu inside a scrollable Modal that uses two-phase activation, iOS Safari scrolls the modal content to the top.
Reproduction: https://codesandbox.io/p/sandbox/muddy-leaf-kgr6r6
Steps to reproduce (iOS Safari only):
- Open the modal
- Scroll down
- Tap a DropdownMenu trigger
- Modal jumps to the top
Expected: Modal stays at the same scroll position