Skip to content

MouseRegion has inconsistent behavior using stylus and touch #156223

Closed
flutter-team-archive/engine
#56075

Description

@beeshi

Copied from internal bug b/371544489

[Summary]

The MouseRegion widget triggers onEnter when a stylus touches down in it, but doesn't trigger onExit when the stylus goes elsewhere on the page. Neither onEnter nor onExit gets triggered when you use a finger instead of a stylus.

[Reproduction project]

The example code on this page: https://api.flutter.dev/flutter/widgets/MouseRegion-class.html
I'm seeing this behavior on a touchscreen chromebook and on ipad, haven't tried on other devices that support touch

[Reason for prioritization]

Causing issues in prod when users use a stylus to draw.

Activity

  1. TahaTesser commented on Oct 4, 2024

    @TahaTesser
    Contributor

    There was a MouseRegion related issue on Android related to stylus, see #154842 (comment)

  2. added
    in triagePresently being triaged by the triage team
    on Oct 7, 2024
  3. huycozy commented on Oct 7, 2024

    @huycozy
    Member

    Checking this using iPad with Apple Pencil, I see the stylus is working as expected, onEnter and onExit are both triggered (please watch the demo video). I also tested with a Bluetooth mouse and see the same expected result here.

    Demo video (iPad Air 5, iPadOS 17.5.1)
    Pencil Mouse
    RPReplay_Final1728289066.mp4
    RPReplay_Final1728289604.mp4

    However, onEnter and onExit are not triggered with touch gesture by finger as reported.

    Checked on Flutter versions:

    Channel stable, 3.24.3
    Channel master, 3.26.0-1.0.pre.374
  4. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    f: gesturesflutter/packages/flutter/gestures repository.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Oct 7, 2024
  5. reopened this on Oct 7, 2024
  6. beeshi commented on Oct 7, 2024

    @beeshi
    Author

    iPad pro, iPadOS 17.4.1

    75000268028__1EA12ED1-CAE6-41DF-859D-6F164DA30109.MOV
  7. removed
    P0Critical issues such as a build break or regression
    on Oct 7, 2024
  8. added
    P0Critical issues such as a build break or regression
    on Oct 7, 2024
  9. xster commented on Oct 7, 2024

    @xster
    Contributor

    Google triage: validating that it's impacting users in production

  10. xster commented on Oct 7, 2024

    @xster
    Contributor

    @beeshi has this been a regression or it's just a newly discovered test case that doesn't work?

  11. beeshi commented on Oct 7, 2024

    @beeshi
    Author

    We’re not entirely sure since I think we didn’t test with a stylus before, but I’d guess its been this way for a while

  12. chunhtai commented on Oct 8, 2024

    @chunhtai
    Contributor

    not entirely sure what is going on, maybe the stylus doesn't follow the pointer event lifecycle. Should stylus be included in mouse event for the first place?

  13. dkwingsmt commented on Oct 23, 2024

    @dkwingsmt
    Contributor

    Update: I'm investigating it. I can reproduce it on my iPad. It occurs only on Web with a stylus.

  14. added
    r: fixedIssue is closed as already fixed in a newer version
    on Nov 4, 2024
  15. github-actions commented on Nov 18, 2024

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

  16. locked as resolved and limited conversation to collaborators on Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressioncustomer: chalk (g3)f: gesturesflutter/packages/flutter/gestures repository.found in release: 3.24Found to occur in 3.24found in release: 3.26Found to occur in 3.26frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions