MetaMask / MetaMask/metamask-mobile

Android OnPress Event Issue

Open
#18,838 0 comments 1 reaction 0 assignees View on GitHub
team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

### Issue Summary:
Users of MetaMask mobile app, on Android, have been facing intermittent issues with button taps within scrollable views not being registered correctly. This problem seems to stem from a broader issue with React Native's handling of touchables in scrollable components, particularly after the integration of the new architecture (Fabric).
### Related GitHub Issues:
- **Main Issue**: [#18147](https://github.com/MetaMask/metamask-mobile/issues/18147) - Button taps not being registered intermittently in scrollable views on Android.
- **Related Issues**:
- [#17269](https://github.com/MetaMask/metamask-mobile/issues/17269) - Similar button interaction issues.
- [#18456](https://github.com/MetaMask/metamask-mobile/issues/18456) - Flagged as a release blocker.
- [#18458](https://github.com/MetaMask/metamask-mobile/issues/18458) - Another critical issue related to button taps.
### Root Cause Analysis (RCA):
- **Integration of Fabric**: The issues became prominent after the integration of React Native's new architecture, Fabric, as outlined in [PR #15363](https://github.com/MetaMask/metamask-mobile/pull/15363), which suggests that the new architecture might be affecting touchable functionality in scrollable areas.
- **React Native Issues**: Several issues have been reported in the React Native repository indicating problems with touchables:
- [react-native#34999](https://github.com/facebook/react-native/issues/34999)
- [react-native#36710](https://github.com/facebook/react-native/issues/36710)
- [react-native#51621](https://github.com/facebook/react-native/issues/51621) which links to a PR ([react-native#51835](https://github.com/facebook/react-native/pull/51835)) that supposedly fixes the issue.
### Current Status:
- **Mitigations**: The MetaMask team has attempted to implement various mitigation measures to address the button tap issues, including tweaks in touchable configurations. However, these efforts have not fully resolved the problem, with intermittent failures still reported.
- **Need for Permanent Fix**: The team has recognized that the mitigation measures are temporary and that a permanent solution should likely come from adjustments or fixes within the React Native framework itself, particularly the verification and potential integration of the changes proposed in [react-native#51835](https://github.com/facebook/react-native/pull/51835).
### Actions Taken:
- Efforts are ongoing to address these issues, with multiple PRs submitted for potential fixes and mitigations. The team is actively discussing the problem and testing solutions, as seen in the conversation threads and pull requests linked above.
This summarizes the primary concerns and actions regarding the button tap issues in MetaMask's mobile application as they relate to recent developments and discussions within the team and the broader React Native community.

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [x] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction and context in issues #18147, #17269, #18456, and #18458, then review the Fabric-related integration in PR #15363 and React Native PR #51835. Reproduce the intermittent Android tap failure in a scrollable view and verify any proposed framework or mitigation change against the linked scenarios; done means taps are reliably registered.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.