Skip to content

[ActionSheet] - Fix Android modal back dismiss#4005

Draft
MIchaelZablianov wants to merge 1 commit into
masterfrom
fix/action-sheet-android-modal-back-workaround
Draft

[ActionSheet] - Fix Android modal back dismiss#4005
MIchaelZablianov wants to merge 1 commit into
masterfrom
fix/action-sheet-android-modal-back-workaround

Conversation

@MIchaelZablianov
Copy link
Copy Markdown
Collaborator

Issue Description:

  • Closing the React Native Modal demo with the Android hardware back button left the screen in a bad touch state.
  • Follow-up attempts could show button press feedback without reopening the modal.

Solution:

  • Keep the demo scoped to React Native's raw Modal, but wrap it in a plain RN View and create a fresh native modal instance for each open via modalKey.
  • Handle hardware back through onRequestClose, disable Android modal animation, and enable hardware acceleration.
  • Added summary.md with the investigation notes, failed attempts, and the verified workaround.

Changed Files:

  • demo/src/screens/componentScreens/ActionSheetScreen.tsx - adds the Android modal back-button workaround and modal comparison demo controls.
  • summary.md - records findings for future work.

Testing Changes:

  • Verified with ESLint: yarn eslint "demo/src/screens/componentScreens/ActionSheetScreen.tsx" -c .eslintrc.js --ext .tsx.
  • Verified on an Android device by opening the modal, closing with hardware back, and reopening it.

Breaking Changes:

  • None.

Changelog:

  • ActionSheet - Fix Android back-button dismissal behavior in the React Native Modal demo.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ PR Description Validation Failed

The following required sections need attention:

  • Description: Section is missing completely
  • Changelog: Section is missing completely
  • Additional info: Section is missing completely

Required Sections:

  • Description - Explain what changes are being made and why
  • Changelog - User-facing summary, this will show in the release notes (include component names, relevant props, and general purpose)
  • Additional info - Links to related issues, Jira tickets

Please update your PR description to include all required sections with meaningful content.


This validation ensures all sections from the PR template are properly filled.

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.

1 participant