From 37e06aa157408f656eda7f366175abe00f108a4b Mon Sep 17 00:00:00 2001 From: Oleksii Bulenok Date: Tue, 28 Jul 2026 17:57:37 +0200 Subject: [PATCH] fix TextInput resizes on Android when the first chat is typed --- src/components/forms/TextField.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/forms/TextField.tsx b/src/components/forms/TextField.tsx index 6e3c71bbc8..2512403ec3 100644 --- a/src/components/forms/TextField.tsx +++ b/src/components/forms/TextField.tsx @@ -267,7 +267,16 @@ export function createInput(Component: typeof TextInput) { ctx.onBlur() onBlur?.(e) }} - placeholder={placeholder === null ? undefined : placeholder || label} + /* + * Android sizes an empty input from the font's bounding box instead + * of `lineHeight`, so a field with no placeholder shrinks on the + * first keystroke. + */ + placeholder={ + placeholder === null + ? platform({android: ' '}) + : placeholder || label + } placeholderTextColor={t.palette.contrast_500} keyboardAppearance={t.name === 'light' ? 'light' : 'dark'} style={flattened}