-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Hardware button on android stops working when dismissing Dialog #3075
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
I can verify the the issue still persists in react-native-paper v. 4.11.2 In addition, after dismissing the dialog by pressing outside the dialog (in the grey area); the hardware back button works if i press it two timess in a row fast. It seems like the dialog screen still hangs somehow |
I think a PR has just been merged to fix this: #3049 |
I can confirmed it is fixed: And it works! 🎉 |
Current behaviour
When we dismiss a dialog by pressing outside the dialog the hardware back button on android stops working, but pressing back on the navigation header works.
Expected behaviour
When we dismiss a dialog by pressing outside the dialog e.g. by setting visible to false, we still expect the hardware back button on android to work
{visible && <TestDialog visible={visible} onDismiss={onDismiss} />}
Code sample
Full code sample
Expo snack
A summary of the code:
What have you tried
If i change
{visible && <TestDialog visible={visible} onDismiss={onDismiss} />}
to
<TestDialog visible={visible} onDismiss={onDismiss} />
it works.
But we have some cases where we would like to able to just do like this
{visible && <TestDialog visible={visible} onDismiss={onDismiss} />}
Your Environment
Moto G7 Android Version 10
we used a virtual hardware button in this example. But our customers have the issue as well on devices with real hardware buttons
Deps from the expo snack:
The text was updated successfully, but these errors were encountered: