Skip to content

Add ability to disable highlighting text field on focus in text field on web/desktop #163399

Closed

Description

@camfrandsen

Use case

This is a follow on to #78895

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!

Activity

  1. 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
  2. darshankawar commented on Feb 17, 2025

    @darshankawar
    Member

    @camfrandsen Feel free to send PR.

  3. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    platform-webWeb applications specifically
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Feb 17, 2025
  4. camfrandsen commented on Feb 17, 2025

    @camfrandsen
    ContributorAuthor

    @darshankawar Perfect! I just made it here! Thank you for your help!
    #163491

  5. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Feb 19, 2025
  6. bleroux commented on Jul 7, 2025

    @bleroux
    Contributor

    Fixed by #163491

  7. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jul 7, 2025
  8. github-actions commented on Jul 21, 2025

    @github-actions

    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.

  9. locked as resolved and limited conversation to collaborators on Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions