-
Notifications
You must be signed in to change notification settings - Fork 107
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
Unable to dismiss bottom drawer when predictive back gesture is on #602
Labels
Comments
Hey @lazzzis I don't see the option to enable predictive back animations within the developer options on both my android 14 and android 15 emulated pixel devices, can you share which device you are using? |
microsoft-github-policy-service
bot
added
Needs: Attention
and removed
Needs: Author Feedback
Status: No Recent Activity
labels
Oct 14, 2024
Gentle ping that this issue needs attention. |
Hey @lazzzis would you be comfortable scheduling a meeting about this issue? |
Dhruv-Mishra
added
v-next
Status: In PR
and removed
Needs: Attention
Issue Pinged
labels
Dec 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment Information
Please provide a reproduction of the bug:
I am working on refactoring my app to support Android's predictive back gesture, which is expected to be enabled by default from Android 15.
To test it on Android 13 and 14, following these instructions:
android:enableOnBackInvokedCallback="true"
in AndroidManifest.xmlActual behavior:
Unable to dismiss the bottom drawer.
Expected behavior:
Swiping back should dismiss the bottom drawer.
Priorities and help requested:
Are you willing to submit a PR to fix?
Okay but need guidance. I know the reason why it fails is because currently ModalPopup relies on KEYCODE_BACK to handle back events.
fluentui-android/fluentui_core/src/main/java/com/microsoft/fluentui/compose/ModalPopup.kt
Line 213 in 4b780d4
But per android's doc, once predictive back gesture is enabled, Android OS will not send KEYCODE_BACK when back button is pressed. The solution is to migrated to OnBackPressedDispatcher as suggested by Android's official guide. But due to potential complexities, I am not very confident to refactor ModalPopup without guidance.
Requested priority: High
The text was updated successfully, but these errors were encountered: