Skip to content

TapRegion should detect right click or middle button click #136706

Closed

Description

@anidotnet

Is there an existing issue for this?

Use case

I am currently having difficulties to detect if a mouse right click or mouse middle click has happened outside of a widget. This is really necessary to display a custom menus in a desktop application.

Currently, TapRegion widget only detects left mouse click for onTapInside and onTapOutside. Thus, there is no way currently to detect if a right click or middle click event has happened outside of the region of a widget. On the other-hand, GestureDetector can detect right click etc but no way to detect if the click has happened outside of the GestureDetector.

Proposal

It would be really nice to have TapRegion detect all kinds of mouse button click event.

Activity

  1. dam-ease commented on Oct 17, 2023

    @dam-ease

    Hi @anidotnet. Thanks for proposing this. I see there is an open proposal similar to yours #128317. Can you check this out?

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 17, 2023
  3. anidotnet commented on Oct 17, 2023

    @anidotnet
    ContributorAuthor

    The mentioned proposal handles a different aspect of TapRegion, to extend the region in case of a dropdown. But my proposal is a bit different.

    I am mostly looking for the ability to detect right, middle mouse click inside and outside of TapRegion. Currently TapRegion only respond to left mouse click. It doesn't have the ability to detect any other mouse button click.

    Let me know if you need more info or clarification.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 17, 2023
  5. added
    c: new featureNothing broken; request for a new capability
    p: material_uimaterial_ui package in flutter/packages
    f: gesturesflutter/packages/flutter/gestures repository.
    c: proposalA detailed proposal for a change to Flutter
    team-designOwned by Design Languages team
    frameworkflutter/packages/flutter repository. See also f: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Oct 17, 2023
  6. dkwingsmt commented on Oct 17, 2023

    @dkwingsmt
    Contributor

    It sounds like a reasonable use case. I encourage you to submit a PR to add it. :)

    We typically define a minimal feature set when we first design a widget (as in the case of TapRegion, only the primary button callbacks but not the other buttons), and wait until a reasonable use case report to add more.

  7. anidotnet commented on Oct 18, 2023

    @anidotnet
    ContributorAuthor

    @dkwingsmt I have submitted the PR and waiting for the review.

  8. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Oct 18, 2023
  9. anidotnet commented on Nov 30, 2023

    @anidotnet
    ContributorAuthor

    @HansMuller @dkwingsmt I have updated the PR #136799 as requested. Could you please provide a timeline when this can be merged?

  10. dkwingsmt commented on Nov 30, 2023

    @dkwingsmt
    Contributor

    Sorry for missing your update. Approved!

  11. added a commit that references this issue on Dec 4, 2023
    3f1f0aa
  12. added
    r: fixedIssue is closed as already fixed in a newer version
    on Dec 6, 2023
  13. github-actions commented on Dec 20, 2023

    @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.

  14. locked as resolved and limited conversation to collaborators on Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: gesturesflutter/packages/flutter/gestures repository.frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesr: 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