Skip to content

Fix TextInput outline collapsing below theme default padding - #59372

Open
mehulg-meta wants to merge 1 commit into
react:mainfrom
mehulg-meta:export-D126540563
Open

mehulg-meta wants to merge 1 commit into
react:mainfrom
mehulg-meta:export-D126540563

Conversation

@mehulg-meta

Copy link
Copy Markdown

Summary:
TextInput keeps the theme's default EditText background but applies the style's padding. That background is an inset around underline nine-patches, so its outline is the view bounds minus the insets, which only the theme padding covers. With less padding, such as padding: 0, the outline collapses to a strip through the text, which breaks elevation shadows and anything else that reads the view outline.

ReactEditText now uses its bounds as the outline in that case, and refreshes the outline when its padding changes, since Android only does so on size and background changes. Any other background, including the ones React Native creates for border and background styles, keeps its normal outline.

Changelog:
[Android][Fixed] - Fix TextInput outline collapsing when its padding is below the theme default

Differential Revision: D126540563

Summary:
TextInput keeps the theme's default EditText background but applies the style's padding. That background is an inset around underline nine-patches, so its outline is the view bounds minus the insets, which only the theme padding covers. With less padding, such as `padding: 0`, the outline collapses to a strip through the text, which breaks elevation shadows and anything else that reads the view outline.

`ReactEditText` now uses its bounds as the outline in that case, and refreshes the outline when its padding changes, since Android only does so on size and background changes. Any other background, including the ones React Native creates for border and background styles, keeps its normal outline.

Changelog:
[Android][Fixed] - Fix `TextInput` outline collapsing when its padding is below the theme default

Differential Revision: D126540563
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 22, 2026
@meta-codesync

meta-codesync Bot commented Oct 22, 2026

Copy link
Copy Markdown

@mehulg-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126540563.

@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at 12c621ee1403.

android: no baseline for this environment

ios: no capture

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant