Repository navigation
Missing scrolling inertia on iPadOS when using trackpad #97084
Copy link
Copy link
Closed
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Description
Steps to Reproduce
- Execute
flutter runon the code sample - Connect an external trackpad to iPad (in this case, I am using the Magic Keyboard)
- Use the two-finger scroll gesture
Expected results:
Scrolling animation should not stop when I lift my fingers from the trackpad. It should have inertia, just like when using touch input or when scrolling on computers.
Actual results:
Scrolling animation stops abruptly when I lift my fingers from the trackpad.
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
var text = "Example Text ";
for (var i in Iterable.generate(100)) {
text = text + i.toString() + '\n';
}
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: SingleChildScrollView(
child: Text(
text,
),
),
);
}
}Logs
No log at all! even with --verbose (except at build time)
I guess scroll event simply isn't logged.
Analyzing flutter_application_1...
No issues found! (ran in 3.0s)
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale en-US)
• Flutter version 2.8.1 at /Users/user/Projects/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] VS Code (version 1.63.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.32.0
[✓] Connected device (3 available)
(devices omitted)
Video:
RPReplay_Final1642906616.MP4
Comparing trackpad scroll vs finger scroll (the transparent dot indicates trackpad is being used)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Activity
darshankawar commentedon Jan 24, 2022
@singularity-s0
By missing scrolling inertia, do you mean when we try to flung scrollbar, it doesn't scroll correct ?
If so, can you check if this issue is similar to your case ?
singularity-s0 commentedon Jan 24, 2022
Hi, thanks for the reply.
No, this issue has nothing to do with scrollbar. As you can see in the video no scrollbar activity is involved.
This issue occurs when one uses the two-finger scroll gesture on external trackpads connected to an iPad. It is quite obvious.
Scrolling with other input is not affected.
darshankawar commentedon Jan 25, 2022
@singularity-s0
Can you try to see what does
ScrollPosition.isScrollingNotifierreturns if you use two-finger gesture to scroll using trackpad ? Does it return false or true using something like:singularity-s0 commentedon Jan 25, 2022
It prints
falsewhen scrolling with trackpad andtruewhen scrolling with finger.darshankawar commentedon Jan 26, 2022
@singularity-s0
Thanks for verifying. Based on your finding, I believe you are hitting #75591, so I suggest you to follow-up in it for further updates.
Closing this as a duplicate. If you disagree, write in comments and I'll reopen it.
github-actions commentedon Feb 9, 2022
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.