fix TextInput resizes on Android when the first chat is typed

This commit is contained in:
Oleksii Bulenok
2026-07-28 17:57:37 +02:00
parent 27e4f84f3f
commit 37e06aa157
+10 -1
View File
@@ -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}