Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/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 specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform teamTriaged by the Windows platform team
Description
Steps to Reproduce
- Execute
flutter runon the code sample - .Try to scroll horizontally
Expected results: The SingleChildScrollView, or in fact, any Horizontally Scrollable Widget, should scroll horizontally.
Actual results: The widget is not scrollable as the horizontal scroll on trackpad changes focus on the AppBar Buttons
I am aware that there has been a simillar issue for this as in #83359 and #82982, suggesting to fix it by applying a custom scroll behaviour
class MouseScrollBehaviour extends MaterialScrollBehavior {
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
PointerDeviceKind.trackpad,
};
}But this does not solve this issue. Also, this issue is not present on Web. If this is not an issue and is the intended behavior, then how can we disable this behavior on our side and not flutter side.
Code sample
import 'package:flutter/material.dart';
void main() => runApp(const HorizontalScrollingNotWorkingApp());
class HorizontalScrollingNotWorkingApp extends StatefulWidget {
const HorizontalScrollingNotWorkingApp({Key? key}) : super(key: key);
@override
State<HorizontalScrollingNotWorkingApp> createState() =>
_HorizontalScrollingNotWorkingAppState();
}
class _HorizontalScrollingNotWorkingAppState
extends State<HorizontalScrollingNotWorkingApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Scaffold(
appBar: AppBar(
title: const Text('Classic Material App Bar'),
leading: const BackButton(),
actions: [
IconButton(
onPressed: () {},
icon: const Icon(Icons.crop),
),
IconButton(
onPressed: () {},
icon: const Icon(Icons.info_outline),
),
IconButton(
onPressed: () {},
icon: const Icon(Icons.settings),
),
],
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
color: Colors.red,
height: MediaQuery.of(context).size.height * 0.8,
width: 2000,
),
),
)),
),
);
}
}
Logs
No Error Shown On Windows.
No Analysis Errors Shown on Windows.
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.25126.1000], locale en-IN)
• Flutter version 3.0.1 at D:\SDKs\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (12 days ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at D:\SDKs\android_sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: D:\IDEs\AndroidStudio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.0)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31025.194
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• Android Studio at D:\IDEs\AndroidStudio
• 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.12+7-b1504.28-7817840)
[√] VS Code (version 1.67.2)
• VS Code at C:\Users\Naman Bharat Gor\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.18.1
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.25126.1000]
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.67
• Edge (web) • edge • web-javascript • Microsoft Edge 100.0.1185.50
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Reacted by Antonio Spadaro, Jannik Schmitt, Naman Gor, zs-dima, bhtri, Yassine Ben Massaoud, jezell, Tanvir Ahmed Khan, Jakub Janků, jakobaltendorfer and 5 more
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/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 specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform teamTriaged by the Windows platform team
Activity
exaby73 commentedon Jun 1, 2022
Hello @namangor04. The code sample you provided has a single solid color which is why you can't notice the scroll. I have modified the code to include a green container as well. See the video of the scrolling.
Video
105095_macos_stable.mov
Code sample
flutter doctor -v(Stable)flutter doctor -v(Master)devNamanG commentedon Jun 1, 2022
Hello @exaby73, I noticed that you sent me the video which was recorded on MacOS. But I am using windows and I am having issues on windows stable, not MacOS stable. I would like you to reopen this issue asap. I am also attaching a file filmed using your code sample which clearly shows that this horizontal scrolling on windows does not work
flutter_issue.2022-06-01.15-20-54.mp4
exaby73 commentedon Jun 1, 2022
Hey @namangor04. I'm assuming you are pressing
Shiftwhile using the scroll wheel to scroll horizontally. Can you confirm if this is also on the web?devNamanG commentedon Jun 1, 2022
This is not on web, this is on windows only. I am not pressing shift sir.
Edit: And I can confirm that even if I do press shift, there is no difference. I checked it right now.
And I am on laptop using a trackpad, not a Scroll wheel.
maheshj01 commentedon Jun 1, 2022
@namangor04, I can confirm that horizontal Listview is scrollable on windows, It may be that the container width is large enough with a single color and as a result, the scroll is not noticeable, I have added a scrollbar to this code sample shared above and it should be clearly visible.
scrollIssue_Trim.mp4
code sample
60 remaining items
khomin commentedon Aug 8, 2023
I'm on mac
and mouse wheel doesn't work when
Axis.horizontal(only with pressed 'shift')Could you put this in the doc so developers can show managers that flutter doesn't allow scroll with mouse
ListView.builder( scrollDirection: Axis.horizontaldevNamanG commentedon Sep 8, 2023
Any updates on this?
FTKhanFT commentedon Feb 13, 2024
Thank for the suggestion.
This is working.
flutter-triage-bot commentedon Jun 6, 2024
The
triaged-desktoplabel is irrelevant if there is noteam-desktoplabel orfyi-desktoplabel.RuedigerMoeller commentedon Jul 9, 2024
also does not work on linux (Ubuntu 22.04). Mousewheel horizontal scrolling is broken, with workarounds I am able to scroll by click & drag. No Scrollbar showing up though (SingleChildScrollview). Same Code works on MacOS Desktop
gmenezes-sistemas commentedon Jul 28, 2025
Any update for this? Same behavior here.
Good-Andre commentedon Dec 4, 2025
A working solution for Windows 10: horizontal mouse scrolling and touch scrolling.