Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: prevent freezing modal screens on iOS#12631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kligarski wants to merge3 commits intoreact-navigation:main
base:main
Choose a base branch
Loading
fromkligarski:@kligarski/prevent-freezing-modals-on-ios

Conversation

kligarski
Copy link
Contributor

To be merged after#12503.

Motivation

iOS modals are presented in a seperate hierarchy. When you open a modal screen and push multiplepresentation: 'card' screens (they are pushed "behind" the modal), the modal screen gets frozen, because it isn'tpreloaded,focused norbelowFocused (pushed screens are above the modal inroutes list). You can't interact with the content of the modal, you can only dismiss it.

beforeafter
before.mov
after.mov

In this PR, we prevent freezing modal screens on iOS in order to avoid this problem.

The reasoning behind this change is that you shouldn't show more that 1-2 modal screens at the same time - this is also a recommendation inApple's Human Interface Guidlines:

Let people dismiss a modal view before presenting another one. Allowing multiple modal views to be visible at the same time tends to create visual clutter and can make your app seem scattered and disorganized. People need to remember the context they were in before a modal view appears, so presenting multiple views adds to people’s cognitive load, especially when a modal view hides another one by appearing on top of it. Although an alert can appear on top of all other content — including other modal views — you never want to display more than one alert at the same time.

Test plan

RunTest791 inreact-native-screens' example app.

VNDRN reacted with thumbs up emoji
@kligarski
Copy link
ContributorAuthor

@kkafar

@netlifyNetlify
Copy link

netlifybot commentedJun 6, 2025

Deploy Preview forreact-navigation-example ready!

NameLink
🔨 Latest commit24a0daf
🔍 Latest deploy loghttps://app.netlify.com/projects/react-navigation-example/deploys/6842cb701024fa00085223f8
😎 Deploy Previewhttps://deploy-preview-12631--react-navigation-example.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify project configuration.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@kligarski

[8]ページ先頭

©2009-2025 Movatter.jp