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
{{ message }}
Repository navigation
Add ability to disable highlighting text field on focus in text field on web/desktop #163399
In that issue, it made it so that when a text field gets focus, it highlights all of the text (which is correct behavior for web/desktop) My question is could we add a parameter to not do that on web/desktop. So by default, it would continue to do that, but I could turn it off on specific text fields.
The use case I have is they could be typing in a text field and then press enter. When they press enter, focus goes to the modal that pops up. When the user dismisses the modal, we want the focus to go back the text field with the same selection that it had before.
Proposal
One of the first comments made in that issue is gspencergoog saying it should be optional at least. My question is could we still make it optional? (obviously in the opposite direction since it is always enabled)
I would love to make the pull to make this change. It is a straight forward change and the unit test for it is very simple. It would also be an amazing learning opportunity for me. Having said that, I could see how it could potentially take more time to review my code 😆
Let me know what you think, and thank you for everything you do!
changed the title [-]Add ability to disable highlighting text field on focus in text field[/-][+]Add ability to disable highlighting text field on focus in text field on web/desktop[/+]on Feb 17, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]Add ability to disable highlighting text field on focus in text field[/-][+]Add ability to disable highlighting text field on focus in text field on web/desktop[/+]darshankawar commentedon Feb 17, 2025
@camfrandsen Feel free to send PR.
camfrandsen commentedon Feb 17, 2025
@darshankawar Perfect! I just made it here! Thank you for your help!
#163491
Add Option to disable full selection on focus on TextField, TextFormF…
bleroux commentedon Jul 7, 2025
Fixed by #163491
github-actions commentedon Jul 21, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.