-
Notifications
You must be signed in to change notification settings - Fork 28.6k
ListView.builder with a custom controller will not respond to PageUp/PageDown key events on the web #93521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @thumbert, thank you for filing this issue. I tested this on the latest stable and master channel and it is reproducible flutter doctor -v[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
• Flutter version 2.5.3 at /Users/flo/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (4 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/flo/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• 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)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.0, Build version 13A5212g
• CocoaPods version 1.11.0
[✓] 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)
[✓] VS Code (version 1.60.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.27.0
[✓] Connected device (4 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• iPhone 12 Pro Max (mobile) • 98CBBFB1-4069-4A28-B7F7-138911ACBE72 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 11.6.1 20G224 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
! Doctor found issues in 1 category. [✓] Flutter (Channel master, 2.6.0-12.0.pre.701, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
• Flutter version 2.6.0-12.0.pre.701 at /Users/flo/fvm/versions/master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 24b9346c9b (7 hours ago), 2021-11-11 16:45:40 -0800
• Engine revision aaacb670af
• Dart version 2.15.0 (build 2.15.0-285.0.dev)
• DevTools version 2.8.0
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/flo/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• 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)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.0
[✓] 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)
[✓] VS Code (version 1.60.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.27.0
[✓] Connected device (4 available)
• sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• iPhone 12 Pro Max (mobile) • 98CBBFB1-4069-4A28-B7F7-138911ACBE72 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
• macOS (desktop) • macos • darwin-x64 • macOS 11.6.1 20G224 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.63
! Doctor found issues in 1 category. Thank you |
Hi @thumbert the default behavior for keyboard shortcuts like page up and page down centers around focus. When you press page up and page down, the scrollable that encloses the nearest focus will receive the input.
I think this is working as expected, so I am going to close this issue, but if we missed something, let us know and we can take another look! |
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 |
Steps to Reproduce
Run the following code
If I run this example for a web target, pressing PageUp and PageDown on the keyboard does not have any effect. If I comment out the line
the PageUp and PageDown presses work as expected. Is this normal/expected? How do I get the default behavior if I want to have a custom scroll controller?
Sorry for cross posting, but I got no answer on SO and this potentially is a bug
https://stackoverflow.com/questions/69791696/flutters-listview-builder-with-custom-controller-will-not-respond-to-pageup-pag
Thanks for your help,
Tony
The text was updated successfully, but these errors were encountered: