-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: desktopRunning on desktopRunning on desktopa: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
This issue is reproducible on both the stable and master branch, and affects both desktop and web applications. I checked the behaviour with web apps such as YouTube and the chrome browser and it seems that they take into consideration the position of the cursor when deciding as to whether to move the ScrollBar.
video of bug in Flutter:
simplescreenrecorder-2022-07-16_02.10.52.mp4
video of expected behaviour in YouTube:
simplescreenrecorder-2022-07-16_02.23.04.mp4
Reproducible code:
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: const Center(
child: MyStatefulWidget(),
),
),
);
}
}
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({Key? key}) : super(key: key);
@override
State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}
class _MyStatefulWidgetState extends State<MyStatefulWidget> {
final ScrollController _firstController = ScrollController();
@override
Widget build(BuildContext context) {
return Scrollbar(
thumbVisibility: true,
controller: _firstController,
child: ListView.builder(
controller: _firstController,
itemCount: 100,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Text('Scrollable 1 : Index $index'),
);
}),
);
}
}
flutter doctor -v
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1633, on LMDE 5 (elsie)
5.10.0-16-amd64, locale en_GB.UTF-8)
• Flutter version 3.1.0-0.0.pre.1633 on channel master at
/home/henryr/Dev/SDK/Flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 95a5a8d741 (2 days ago), 2022-07-13 09:53:40 -0700
• Engine revision 20038216ac
• Dart version 2.18.0 (build 2.18.0-272.0.dev)
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
• Android SDK at /home/henryr/Android/Sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at:
/home/henryr/Dev/SDK/AndroidStudio/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 11.0.1-2
• cmake version 3.18.4
• ninja version 1.10.1
• pkg-config version 0.29.2
[✓] Android Studio (version 2021.2)
• Android Studio at /home/henryr/Dev/SDK/AndroidStudio/android-studio
• Flutter plugin version 69.0.2
• Dart plugin version 212.5744
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • LMDE 5 (elsie) 5.10.0-16-amd64
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
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 desktopa: mouseIssues related to using a mouse or mouse supportIssues related to using a mouse or mouse supportf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.0Found to occur in 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.good first issueRelatively approachable for first-time contributorsRelatively approachable for first-time contributorshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version