You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem onContentSizeChange property on <TextInput /> has incorrect behaviour.
When content height has became smaller the onContentSizeChange does in fact triggered but the internal height is incorrect.
Type some text for multiline (3 lines for example)
remove one line
Expected behavior
To see expected behaviour easy enough switch the version to 0.14.3 in the codesandbox
Environment (include versions). Did this work in previous versions?
React Native for Web (version): 0.17
React (version): 16.8.4
Browser: 16.8.4
Additional context
That issue report based on #1339
The behaviour changed in version 0.14.4. In 0.14.3 that work correct and the reported content size is indeed the size of the content
The version 0.14.4 has two commits:
@eseQ Have you looked at this other issue #795, particularly this code ? It may be what you need.
Otherwise, try manually reversing those two commits to see if you can debug the offending line(s) of code.
EDIT: I retract this answer, seems to also be a one-way size increase. Perhaps other answers in there might help, I have no explored them all as they were not needed in my use case.
Activity
eseQ commentedon Dec 9, 2021
@necolas can you help me?
rissois commentedon Dec 23, 2021
@eseQ Have you looked at this other issue #795, particularly this code ? It may be what you need.
Otherwise, try manually reversing those two commits to see if you can debug the offending line(s) of code.
EDIT: I retract this answer, seems to also be a one-way size increase. Perhaps other answers in there might help, I have no explored them all as they were not needed in my use case.
eseQ commentedon Dec 23, 2021
@rissois thanks for your reply. I'll check the issue later. It seems like useful idea.
eseQ commentedon Dec 23, 2021
Solution is here:
but is only a hack. Still waiting for regular fix.
shawhu commentedon Oct 6, 2024
I am having the same problem. on web platform, the onContentSizeChange won't fire.
I'm using the latest expo.dev
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-navigation/native": "^6.0.2",
"deepmerge-ts": "^7.1.1",
"expo": "~51.0.28",
"expo-asset": "~10.0.10",
"expo-constants": "~16.0.2",
"expo-font": "~12.0.9",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.23",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"expo-web-browser": "~13.0.3",
"markdown-it": "^14.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.5",
"react-native-gesture-handler": "~2.16.1",
"react-native-paper": "^5.12.5",
"react-native-paper-alerts": "^0.1.3",
"react-native-reanimated": "~3.10.1",
"react-native-root-siblings": "^5.0.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-uuid": "^2.0.2",
"react-native-web": "~0.19.10"
},
my code:
vishnuc commentedon Mar 26, 2025
HI , same issue how to fix this issue , its increasing but not decreasing ?
PatoSala commentedon Jan 23, 2026
Same issue here