Repository navigation
hitTesting offset when using SliverMainAxisGroup in CustomScrollable(reverse: true) #170999
Copy link
Copy link
Closed
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/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 onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework team
Description
Steps to reproduce
When SliverMainAxisGroup is used in a CustomScrollable with reverse: true then the main axis extent of the last child of the SliverMainAxisGroup (incorrectly) offsets hit testing of the other children.
Perhaps related to #170991, #167801 (Logging this separately as I'm not sure and this deserves it's own widget tests)
Please add any fix as a point release to Flutter 3.32.
Expected results
hit testing works correctly.
Actual results
Tapping on the bottom 40dp of the red box does nothing, while tapping above outside of the red box prints "TAP".
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) => Directionality(
textDirection: TextDirection.ltr,
child: Padding(
padding: const EdgeInsets.all(20.0),
child: CustomScrollView(
reverse: true,
slivers: [
SliverMainAxisGroup(
slivers: [
SliverToBoxAdapter(
child: GestureDetector(
onTap: () {
print("TAP");
},
child: Container(color: Color(0xffff0000), height: 60),
),
),
SliverToBoxAdapter(child: SizedBox(height: 40)),
],
),
],
),
),
);
}
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.32.4, on macOS 15.5 24F74 darwin-arm64, locale en-NL)Also broken on 3.33.0-1.0.pre.559
Was still working on 3.29.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
f: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.32Found to occur in 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33Found to occur in 3.33frameworkflutter/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 onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework team
Activity
danagbemava-nc commentedon Jun 25, 2025
Reproducible using the code sample provided above.
Screen.Recording.2025-06-25.at.10.32.29.AM.mov
flutter doctor -v
Fix the hitTest issue of reversed SliverMainAxisGroup. (#171073)
Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter#171073)
github-actions commentedon Jul 24, 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.Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter#171073)
Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter#171073)
Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter#171073)
Fix the hitTest issue of reversed SliverMainAxisGroup. (flutter#171073)