Skip to content

Material text selection menu overflow buttons should be full-width #72023

Open

Description

@justinmc

Tapping in the empty space to the right of "Custom button 2" should hit the button. Currently, it has no effect.

Screen Shot 2020-12-09 at 1 59 45 PM

To fix this:

  1. Make the buttons full-width by setting the min and max width in their layout to the full width of the menu (code).
  2. Align the text in the button to the left or right depending on the text direction.

Currently, TextButton always centers its child and can't align to the left or right.

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    on Dec 10, 2020
  2. justinmc commented on Dec 10, 2020

    @justinmc
    ContributorAuthor

    I discussed with @HansMuller and it was suggested that we may want to make TextButton support a configurable alignment. That would make step 2 above much simpler to fix.

  3. Roshan13046 commented on Dec 17, 2020

    @Roshan13046
    Contributor

    I would like to work on this issue.
    can I go ahead?

  4. justinmc commented on Dec 17, 2020

    @justinmc
    ContributorAuthor

    @Roshan13046 Please do, thank you! I've assigned you to this issue.

    It seems like the right solution here is to do something like add an alignment parameter to TextButton.

    FYI This also came up again recently when I looked at implementing at MacOS-style context menu. It will also need TextButtons that can align their text to the left. #31955 (comment)

  5. justinmc commented on Jan 14, 2021

    @justinmc
    ContributorAuthor

    This isn't fixed with #73894, just unblocked. We'll need to use the alignment parameter on the TextSelectionToolbarTextButtons. Also we may need to get fancier with the layout. Really we need the parent to size itself to the largest intrinsic width of its children, and then all the children need to match that width.

  6. added
    P2Important issues not at the top of the work list
    on Mar 17, 2025
  7. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
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: text inputEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-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