Repository navigation
Textfield content disapears when text is too long #51257
Description
http://pub.waves.pw/ms/textfield.mp4
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
• Flutter version 1.12.13+hotfix.8 at /home/renan/code/flutter
• Framework revision 0b8abb4 (11 days ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /home/renan/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /home/renan/code/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Android Studio (version 3.5)
• Android Studio at /home/renan/code/android-studio
• Flutter plugin version 43.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.42.1)
• VS Code at /usr/share/code
• Flutter extension version 3.8.1
[✓] Connected device (1 available)
• Pixel 3a • 9BCAY1J68Q • android-arm64 • Android 10 (API 29)
• No issues found!
Activity
renanyoy commentedon Feb 22, 2020
constrained one line TexField() using
with fontSize:16
jason-simmons commentedon Feb 26, 2020
@justinmc the behavior in this case changed with 6d8f539. Is this working as intended?
renanyoy commentedon Feb 26, 2020
I was using material TextField, I switched to Cupertino one, and it works.
But I think 6d8f539 will not fix material TextField
justinmc commentedon Feb 28, 2020
This is not intended behavior. I'll mark it as a regression.
I was able to reproduce it with the following code (though it looks cut off instead of totally disappearing):
JamesGZM commentedon Apr 23, 2020
I found that it is a height problem. If you set the height to 42, you will not have this problem. How to set the height of the textField?
justinmc commentedon Apr 23, 2020
This appears to be fixed in the latest master thanks to @Piinks and #55408 🎉Let me know if anyone can still see this on master.I was too quick in my testing, looks like it still happens on my Pixel 2.
JamesGZM commentedon Apr 24, 2020
I use the stable branch and look forward to pushing it to the stable branch
justinmc commentedon May 1, 2020
Here's a workaround that seems to fix it for me: use
isDense.I spent some time looking into this and couldn't get a fix yet, but I do see that it's affected by the padding used in InputDecorator's _layout.
50 remaining items
CoderUni commentedon Jun 14, 2024
Thanks for your insights @gnprice .
This issue also occurs without setting a height. Just setting the border to
OutlineInputBorderalso causes the issue:flutter-triage-bot commentedon Oct 17, 2024
This issue is assigned to @LongCatIsLooong but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!
flutter-triage-bot commentedon Jan 3, 2025
This issue was assigned to @LongCatIsLooong but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.
justinmc commentedon Sep 25, 2025
We would love to get this issue fixed but no one is currently working on it. If anyone wants to submit a PR I'd be happy to review.
From @LongCatIsLooong it might be possible to partially workaround this by manually reducing contentPadding, though that might not work if the user has increased their device's font size.