Skip to content

Missing default context menu buttons on each platform #107578

Open

Description

@justinmc

By default, Flutter's text selection toolbar shows cut, copy, paste, and select all. However, on native platforms, other buttons appear by default.

Platform Screenshot Missing Related Work
Android Translate, Share, Web Search Share: #138728
Custom buttons: #139361
iOS Select, Replace, Translate, unit conversion Look up: #130532, flutter-team-archive/engine#43308. Search web: flutter-team-archive/engine#43324, #131898, Share: flutter-team-archive/engine#44554
Linux Undo, Redo, Delete, Insert Emoji, Change Case
Mac Screen Shot 2022-08-08 at 4 00 28 PM Look Up "asdf", Translate "asdf", Search With Google, Share
Windows Undo, Delete, Right to left Reading order, Show Unicode control characters, Insert Unicode control character, Open IME, Reconversion, Search with Bing

Open questions

How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app? (edit: -> #107603)

Related

#82907

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    on Jul 13, 2022
  2. changed the title [-]Match the default native text selection toolbar buttons[/-] [+]Some default buttons are missing from the text selection toolbars[/+] on Jul 13, 2022
  3. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    on Jul 19, 2022
  4. osaxma commented on Jul 27, 2022

    @osaxma
    Contributor

    Hi @justinmc,

    The ability to add custom buttons for app specific functionality should also be considered. For instance, Twitter has "mute" and "search" buttons which are app specific which can be seen when a text is selected. It'd be useful if the developer can add such buttons by providing a list of Strings and their respective callbacks.


    By the way, the table is missing some buttons for iOS and Android:

    • For iOS, the following buttons are not mentioned: Replace, Lookup, Translate, and Share (they appear when text is selected)

    • For Android, "Web Search" isn't mentioned (Maybe it's not appearing in the screenshot because it's taken from within the browser)

  5. justinmc commented on Aug 8, 2022

    @justinmc
    ContributorAuthor

    @osaxma You're in luck for custom app-specific context menu buttons, I have a PR open for that right now: #107193

    And thank you for calling out those missing buttons! I've updated the table to include them.

  6. bksubhuti commented on Dec 18, 2022

    @bksubhuti

    we are dealing with this now as well.
    One monk showed me what we are missing as pictured in op
    Since we are vocabulary intensive reading app, we would also like anki.
    (tipitaka pali reader)

  7. bar4488 commented on Jan 24, 2023

    @bar4488

    The lack of buttons in text selection is critical for native like experience. In android, developers can add floating text selection toolbar actions that will show in every native app through the ACTION_PROCESS_TEXT intent. We should show these options in flutter apps as well.

  8. greggman commented on Feb 9, 2023

    @greggman

    Other standard iOS options

    • search web
    • speak
    • spell
    • add to user dictionary...

    The bigger issue here is not just to add the buttons. It's that the system itself provides them. If iOS 18 or Android 14 adds "ask ChatGPT" and "Generate AI video" and "find related photos" as standard options, it should not require every Flutter app in existance to rebuild with a newer version of flutter and re-go through the app-store approval process for that option to appear on the context menu.

  9. gnprice commented on Feb 15, 2023

    @gnprice
    Member

    As an Android user I find the "Translate" button in particular to be extremely useful, any time I'm reading text in a language other than English. (Even if I know the language moderately well, I'll use it regularly for words and phrases I don't understand.) When it's missing in a given app, if it's any app that's heavy on reading text, I'll notice and it's disappointing.

    So as a developer I imagine many of my users value it too.

    I believe the "Translate" button is actually another example in this category, though (aka #107603):

    How about buttons inserted by the system, such as the Anki Card button in my Android screenshot added by the AnkiDroid app?

    In android, developers can add floating text selection toolbar actions that will show in every native app through the ACTION_PROCESS_TEXT intent. We should show these options in flutter apps as well.

    in that I believe it's added by the Google Translate app. (Other translation apps like DeepL add their own text selection buttons, too.) So supporting this category would be especially appreciated.

  10. 28 remaining items

  11. added
    ⏳Bot is counting down the days until it unassigns the issue
    and removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Jan 11, 2024
  12. flutter-triage-bot commented on Jan 12, 2024

    @flutter-triage-bot

    This issue is assigned to @LouiseHsu 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!

  13. removed their assignment
    on Jan 23, 2024
  14. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Jan 23, 2024
  15. LouiseHsu commented on Jun 12, 2024

    @LouiseHsu
    Contributor

    Translate as a default context menu button for iOS can probably be added now with the new Translation api announced during wwdc24 https://developer.apple.com/documentation/Translation

  16. pagetronic commented on Jul 27, 2024

    @pagetronic
  17. 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: fidelityMatching the OEM platforms bettera: 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