react-navigation / react-navigation/react-navigation

Native Modal is jumping when dragging up on iOS

Open
#10,900 6 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug platform:ios repro provided
Dominant language
TypeScript
Stars
24.5k
Forks
5.1k
Avg merge
1d 5h
Merged PRs (30d)
18

Description

Current behavior

I use native stack with presentation: 'modal' option. When dragging modal up, it jumps at the bottom once I release. It works fine compared to native iOS applications.

If I switch to @react-navigation/stack (not native) there is no such issue.

Video:
Actual issue is at the bottom.
Screen Recording 2022-10-01 at 23 53 05

Expected behavior

Comparing to iOS calendar app:
Screen Recording 2022-10-01 at 23 53 48
Compared

Reproduction
Platform
  • Android
  • iOS
  • Web
  • Windows
  • MacOS
Packages
  • @react-navigation/​bottom-tabs
  • @react-navigation/​drawer
  • @react-navigation/​material-bottom-tabs
  • @react-navigation/​material-top-tabs
  • @react-navigation/​stack
  • @react-navigation/​native-stack
Environment
  • I've removed the packages that I don't use
package version
@react-navigation/native 6.0.13
@react-navigation/bottom-tabs 6.4.0
@react-navigation/native-stack 6.9.0
react-native-safe-area-context 4.2.5
react-native-screens 3.17.0
react-native-reanimated 2.8.0
react-native 0.68.1
npm or yarn yarn

I am able to reproduce on difference iOS and difference devices.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the iOS gesture with @react-navigation/native-stack using the reported package versions, then compare it with @react-navigation/stack and the supplied recordings. Investigate the native-stack and react-native-screens integration involved in modal dragging. Done means releasing the upward drag no longer causes the modal to jump and matches the expected iOS behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.