Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close modal on backdrop press #340

Merged
merged 1 commit into from
May 6, 2024

Conversation

jp30566347
Copy link
Contributor

@jp30566347 jp30566347 commented Apr 12, 2024

What

Adding a way to close the modal on backdrop (grayed area) press.
Fixes #299

How

Adding a TouchableOpacity container to the modal to handle backdrop press events. To avoid events being triggered from the modal content, I wrapped this up in a TouchableWithoutFeedback.

Tested on Android and iPhone simulators.

Questions

Currently, the backdrop press will invoke the close callback, which is what I think we'd want in most situation, but I don't know of all the use cases. We could alternatively add a callback prop to all modal usages where it makes sense.

Copy link
Collaborator

@KKA11010 KKA11010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KKA11010 KKA11010 merged commit 8c1b2ea into cashubtc:main May 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tapping in upper third area to close send/receive pop-up
2 participants