Repository navigation
With EnsureSemantics(), a Scrollable Widget with Internal Widget with NeverScrollableScrollPhysics Causes Jerky Scrolling #159358
Copy link
Copy link
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: castawayf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.27Found to occur in 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Steps to reproduce
- Have a web app with ensureSemantics ran
- Have a listview with internal listview
- Have the internal listview have NeverScrollableScrollPhysics()
- Run web app and scroll
Expected results
Scroll is smooth
Actual results
Scroll jerks around/jumps when scrolling up or down
If ensureSemantics is removed or if GridView or ListView (with NeverScrollableScrollPhysics) is removed or replaced, scroll is smooth.
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
SemanticsBinding.instance.ensureSemantics();
runApp(const TestApp());
}
class TestApp extends StatelessWidget {
const TestApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: TestPage(),
),
);
}
}
class TestPage extends StatelessWidget {
const TestPage({super.key});
@override
Widget build(BuildContext context) {
return ListView(
padding: EdgeInsets.zero,
children: [
SizedBox(
height: 500.0,
width: 400.0,
child: ListView(
scrollDirection: Axis.horizontal,
physics: const NeverScrollableScrollPhysics(),
children: [
Container(color: Colors.red, height: 500, width: 100.0),
Container(color: Colors.blue, height: 500, width: 100.0),
Container(color: Colors.green, height: 500, width: 100.0),
],
),
),
...List.generate(
20,
(index) => ListTile(
title: Text('Test Item $index'),
leading: const Icon(Icons.list),
trailing: const Icon(Icons.arrow_forward),
),
),
],
);
}
}Screenshots or Video
Screenshots / Video demonstration
Screen.Recording.2024-11-19.at.4.17.44.PM.mov
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
Was able to repro on Flutter version 3.24.2 and 3.27.0-0.1.pre
Unable to repro on Flutter version 3.22.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)c: regressionIt was better in the past than it is nowIt was better in the past than it is nowcustomer: castawayf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.27Found to occur in 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Activity
darshankawar commentedon Nov 25, 2024
@emma-roudabush-disney Thanks for the report.
I was able to replicate this on latest master, but not in latest stable (3.24.5).
159358_m.mov
159358_s.mov
Piinks commentedon Dec 6, 2024
Refactoring to avoid nesting ListViews is an available work around here while we investigate this issue:
4 remaining items
[web:a11y] wheel events switch to pointer mode (#163582)
github-actions commentedon Mar 6, 2025
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.