Skip to content

Conversation

cdn34dd
Copy link
Contributor

@cdn34dd cdn34dd commented Aug 11, 2025

What does this PR do?

While the Babel plugin already supports TextInput automatic wrapping, it only does so when users define the onFocus attribute, which is the same behavior we have for other elements, like buttons.

The main different here, is that for buttons having an onPress attribute is essential for the basic functionality, while on TextInputs, the main functionality comes from the onChangeText attribute.

So when onFocus is not present, we should make the babel plugin add it so our wrapping logic works even if the user’s code does not include it.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@cdn34dd cdn34dd requested a review from a team as a code owner August 11, 2025 09:08
Ensure `onFocus` attribute is added if not present already, so our
wrapping logic can happen.
@cdn34dd cdn34dd force-pushed the carlosnogueira/RUM-11283/improve-babel-support-text-inputs branch from 2ad5d19 to 0e2ab3f Compare August 27, 2025 15:45
@cdn34dd cdn34dd merged commit 7021c71 into develop Aug 28, 2025
10 checks passed
@cdn34dd cdn34dd deleted the carlosnogueira/RUM-11283/improve-babel-support-text-inputs branch August 28, 2025 08:46
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.

2 participants