Repository navigation
PanGestureRecognizer with non-primary button gets cancelled when dragging out of the window #166309
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 3.29Found to occur in 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31Found to occur in 3.31frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Activity
- addedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Apr 1, 2025 Reproducible using the code sample and steps provided above. This worked as expected on macOS. It most likely might be due to how lifecycle events are handled on windows. Labeling for further investigation
flutter doctor -v
[√] Flutter (Channel stable, 3.29.2, on Microsoft Windows [Version 10.0.26100.3194], locale en-US) [700ms] • Flutter version 3.29.2 on channel stable at C:\Users\Deana\fvm\versions\stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision c236373904 (3 weeks ago), 2025-03-13 16:17:06 -0400 • Engine revision 18b71d647a • Dart version 3.7.2 • DevTools version 2.42.3 [√] Windows Version (11 Home 64-bit, 24H2, 2009) [4.7s] [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [4.2s] • Android SDK at C:\Users\Deana\AppData\Local\Android\sdk • Platform android-35, build-tools 34.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java This is the JDK bundled with the latest Android Studio installation on this machine. To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`. • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) • All Android licenses accepted. [√] Chrome - develop for the web [166ms] • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.2) [164ms] • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.8.34322.80 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2023.1) [36ms] • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) [√] VS Code (version 1.98.0) [31ms] • VS Code at C:\Users\Deana\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.106.0 [√] Connected device (3 available) [402ms] • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.3194] • Chrome (web) • chrome • web-javascript • Google Chrome 133.0.6943.142 • Edge (web) • edge • web-javascript • Microsoft Edge 134.0.3124.93 [√] Network resources [827ms] • All expected network resources are available. • No issues found![!] Flutter (Channel master, 3.31.0-1.0.pre.356, on Microsoft Windows [Version 10.0.26100.3194], locale en-US) [5.2s] • Flutter version 3.31.0-1.0.pre.356 on channel master at C:\Users\Deana\fvm\versions\master • Upstream repository https://github.com/flutter/flutter.git • Framework revision a48a1f07b8 (3 hours ago), 2025-03-31 22:15:25 -0700 • Engine revision a48a1f07b8 • Dart version 3.8.0 (build 3.8.0-246.0.dev) • DevTools version 2.45.0-dev.0 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [√] Windows Version (11 Home 64-bit, 24H2, 2009) [5.1s] [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [6.8s] • Android SDK at C:\Users\Deana\AppData\Local\Android\sdk • Platform android-35, build-tools 34.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java This is the JDK bundled with the latest Android Studio installation on this machine. To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`. • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) • All Android licenses accepted. [√] Chrome - develop for the web [175ms] • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.2) [171ms] • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.8.34322.80 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2023.1) [36ms] • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) [√] VS Code (version 1.98.0) [32ms] • VS Code at C:\Users\Deana\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.106.0 [√] Connected device (3 available) [603ms] • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26100.3194] • Chrome (web) • chrome • web-javascript • Google Chrome 133.0.6943.142 • Edge (web) • edge • web-javascript • Microsoft Edge 134.0.3124.93 [√] Network resources [1,561ms] • All expected network resources are available. ! Doctor found issues in 1 category.- addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.a: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supporthas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamfound in release: 3.29Found to occur in 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31Found to occur in 3.31and removedin triagePresently being triaged by the triage teamPresently being triaged by the triage team
on Apr 1, 2025 - addedteam-frameworkOwned by Framework teamOwned by Framework teamand removedteam-windowsOwned by the Windows platform teamOwned by the Windows platform team
on Apr 28, 2025 - addedP2Important issues not at the top of the work listImportant issues not at the top of the work listtriaged-frameworkTriaged by Framework teamTriaged by Framework team
on Jun 5, 2025 I think that's exactly the issues for me. I'm working on a fix and contribute it if its working :)
- added a commit that references this issue
on Jul 23, 2026 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 -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 6, 2026
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.found in release: 3.29Found to occur in 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31Found to occur in 3.31frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Steps to reproduce
Expected results
The gesture recognizer still receives updates when dragging out of the window until the mouse button is released
Actual results
The gesture recognizer invokes onEnd immediately after dragging it out of the window
This does not happen with primary mouse button, when using primary mouse button, the gesture recognizer still receives pointer update even when the cursor is no longer inside the application window.
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output