-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Web: scrolling behaviour on Mac does not match platform #75850
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Issue replicable using latest master on chrome and safari. 75850.movflutter doctor -v
|
Lack of overscroll is due to #23604 |
Specially on mobile devices is it noticeable. You can try it out with your phone and our website: https://sharezone.net |
Thanks for providing a repro case. |
As the original comment notes, this isn't so much about speed as it is fidelity; I'm dropping the speed label as part of cleanup and adding fidelity. |
Still have this issue on mobile browsers |
@TahaTesser could you consider the label |
This seems to be much better on Flutter 2.10 🎉 The physics aren't exactly right, but it doesn't feel really laggy anymore, thanks Flutter team ❤️ Not sure if we should leave this open as the physics are still a bit off? |
It seems much better now on latest Demo - Chromechrome.movDemo - Safarisafari.movI also tested with ListView.builder and more number of elements in list:
Demo - 1000 elementschrome_1000.movflutter doctor -v[✓] Flutter (Channel stable, 2.10.5, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
• Flutter version 2.10.5 at /Users/huynq/Documents/GitHub/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (11 days ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] 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 (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• 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 11.0.10+0-b96-7281165)
[✓] Android Studio (version 4.1)
• Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
• 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 1.8.0_242-release-1644-b3-6915495)
[✓] Android Studio
• Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/203.7185775/Android Studio Preview.app/Contents
• 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 11.0.8+10-b944.6842174)
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.62.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.28.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.127
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found! [✓] Flutter (Channel master, 2.13.0-0.0.pre.808, on macOS 12.2.1 21D62 darwin-x64, locale en-VN)
• Flutter version 2.13.0-0.0.pre.808 at /Users/huynq/Documents/GitHub/flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2eed8cbf93 (4 hours ago), 2022-04-28 22:29:06 -0400
• Engine revision dfdfe0b3b0
• Dart version 2.18.0 (build 2.18.0-66.0.dev)
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/huynq/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• ANDROID_HOME = /Users/huynq/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] 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 (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• 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 11.0.10+0-b96-7281165)
[✓] Android Studio (version 4.1)
• Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.7042882/Android Studio.app/Contents
• 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 1.8.0_242-release-1644-b3-6915495)
[!] Android Studio
• Android Studio at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/203.7185775/Android Studio Preview.app/Contents
• 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
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] IntelliJ IDEA Community Edition (version 2020.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.62.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.28.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.127
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
|
flutter web & desktop scroll: flutter doctor -v
|
👀 Not sure if that will fix this? |
It won't be possible to have great trackpad scrolling on flutter web on any platform, we can't have overscrolling since the web browser doesn't tell the web application when the user has lifted their fingers from the trackpad. But probably the rate of speed could be adjusted. Although my PR #108298 is only meant for flutter desktop on mac, and will actually reduce the amount of scrolling compared to before, it won't fix this issue. |
The scrolling in Safari seems significantly slower than Chrome. To the point where it makes the app feel sluggish even though the scrolling is actually pretty smooth (once shader jank resolves...). I think just tweaking the speed on Safari to match Chrome behavior would be a significant improvement. |
On macOS there is a |
Upon more experimentation I found out that scrolling speed of Safari matches the one in Chrome on screens with devicePixelRatio = 1. So it seems that on Safari we need to multiple the touch event pixel delta by devicePixelRatio in order to get consistent result across browsers. |
This makes it consistent with Chrome and partially fixes flutter/flutter#75850
@tomgilder, the linked PR should fix the scroll speed issue on macOS Safari and Firefox. I just tried it with your example and both sides scroll same. Overscroll is bigger problem given the lack of touch lift notification. That said I noticed that on some web-sites (including when running your example) Safari only overscrolls when going ballistic, it doesn't overscroll on drag. While not ideal this still feels better than abrupt stop at the edge and should be doable with flutter-web. |
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 |
Scrolling behaviour on Flutter web doesn't match the native HTML scrolling behaviour on Mac, especially on Safari. The speed is significantly too slow, and there's no over-scroll bouncing effect.
Note that I'm not referring to performance: even at 60fps, the behaviour doesn't feel right.
For me, this is the currently the biggest fidelity issue with Flutter web apps. Scrolling feels really slow, sluggish, and just a bit wrong.
Here's a simple repo that shows a Flutter scrollview side-by-side with a native HTML one:
(note: VS Code will complain this won't compile, but it will run on Chrome after clicking "Debug Anyway")
On the native web site, I can get to the bottom of the native scrollview with one two-finger trackpad swipe, and I get a slight bounce at the end.
On the Flutter side, I can only get half way down, and it takes more swipes to get to the end:
scrolling.mov
Logs
The text was updated successfully, but these errors were encountered: