Repository navigation
Closed
Labels
P2Important issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team
Description
Steps to reproduce
- Create a list of items, e.g. via
ListView - Add a
Tooltipto each element - Start scrolling with the cursor on the
Tooltiparea in the Web
Expected results
Fluent scrolling with Tooltip appearing for each item without stopping to scroll. You get this behavior if you perform scrolling outside of elements.
Screen.Recording.2025-04-12.at.21.34.44.mov
Actual results
Unpredictable stop scrolling when the cursor hits the Tooltip. It's hard to tell from the video, it's better to reproduce in person.
Screen.Recording.2025-04-12.at.21.36.14.mov
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) {
return MaterialApp(
title: 'Tooltip List Example',
home: const TooltipListPage(),
);
}
}
class TooltipListPage extends StatelessWidget {
const TooltipListPage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('List with Tooltips')),
body: ListView.builder(
itemCount: 50,
itemBuilder: (context, index) {
return Tooltip(
showDuration: const Duration(seconds: 1),
message: 'This is item #${index + 1}',
child: ListTile(title: Center(child: Text('Item ${index + 1}'))),
);
},
),
);
}
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.29.2, on macOS 15.1.1 24B91 darwin-arm64, locale en-RU) [1,435ms]
• Flutter version 3.29.2 on channel stable at /Users/glebshalimov/Code/sdks/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c236373904 (4 weeks ago), 2025-03-13 16:17:06 -0400
• Engine revision 18b71d647a
• Dart version 3.7.2
• DevTools version 2.42.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [3.0s]
• Android SDK at /Users/glebshalimov/Library/Android/sdk
• Platform android-35, build-tools 34.0.0
• Java binary at: /Library/Java/JavaVirtualMachines/liberica-jdk-19-full.jdk/Contents/Home/bin/java
This JDK is specified in your Flutter configuration.
To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 19.0.2+9)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,229ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16C5032a
• CocoaPods version 1.16.2
[✓] Chrome - develop for the web [11ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.3) [11ms]
• 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 21.0.5+-12932927-b750.29)
[✓] VS Code (version 1.99.2) [9ms]
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.108.0Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesplatform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team
Activity
Hamed233 commentedon Apr 12, 2025
I'm working on fixing this issue. The problem occurs because the Tooltip's MouseRegion is blocking scroll events. I've implemented a fix that:
I'm currently testing the changes and will submit a PR soon.
khlebobul commentedon Apr 12, 2025
Thank you very much
fix: Improve tooltip scrolling behavior on web
fix: Allow scroll events to pass through tooltips on web
fix: Allow scroll events to pass through tooltips on web
darshankawar commentedon Apr 14, 2025
@khlebobul
I am unable to replicate this on web and also checked on desktop. I tried with trackpad scrolling and mouse scrolling but was unable to replicate. The scroll was smooth with both. Also, I observed that the mouse pointer couldn't properly get over the tooltip, unlike your video in actual results.
The scroll was smooth Is it replicable with mouse or without mouse too ? I tried with latest master version.
Hamed233 commentedon Apr 14, 2025
flutter_issue_scrolling.mp4
khlebobul commentedon Apr 14, 2025
@Hamed233 thank you! @darshankawar, that's exactly what's happening in the video ⬆️
darshankawar commentedon Apr 15, 2025
Thanks for the update and detailed video. I tried again but was unable to replicate, as I couldn't properly place the cursor exactly on top of the tooltip using mouse or trackpad, but based on the reported behavior and potential fix, I'll keep the issue open and label for team's tracking.
5 remaining items
duck-dev-go commentedon Apr 25, 2025
We are experiencing the same issue on Mac OS web.
Piinks commentedon May 1, 2025
Does using Tooltip.ignorePointer to false help with this?
Hamed233 commentedon May 1, 2025
Hi @Piinks ,
Thank you for your feedback on the PR. I've made the following changes to address your concerns:
Fixed the test: I've completely rewritten the "Allow scroll events to pass through tooltips on web" test to be more reliable and provide better debugging information. The test now:
TouchAndMouseScrollBehaviorto ensure both touch and mouse events can trigger scrollingLocal testing: I've run the test locally multiple times and it passes consistently. The test verifies that scrolling works while a tooltip is active, which confirms the fix addresses the issue.
Clean implementation: I've created a fresh branch from master and applied only the necessary changes to fix this specific issue.
The test now provides clear debugging information and is much more robust - it no longer tries to find widgets that might be scrolled out of view, instead relying on the scroll controller's offset to verify scrolling occurred.
Piinks commentedon May 7, 2025
I also have not been able to reproduce this on the web on MacOS. The cursor is not easy to place on the tooltip, and it is positioned below the cursor. I was able to maneuver the cursor over the tooltip for a moment, but was still able to scroll.
For those that have been able to reproduce this, can you please try with Tooltip.ignorePointer to set false and report back?
khlebobul commentedon May 8, 2025
Hello @Piinks
Thank you for your feedback, I just found this discussion. Do I understand correctly that you are talking about such an implementation ⬇️?
I still don't have a proper scroll anyway
Piinks commentedon May 8, 2025
No I was referring to Tooltip.ignorePointer, which was added in #161363
I think this was fixed by that, it just has not reached the stable channel yet.
dkwingsmt commentedon May 9, 2025
By adding
verticalOffset: -10,toTooltip, I managed to make the tooltip appear under my cursor. Even with this, I can't reproduce the issue at the current main (70619a15d0266d7e6a4b8eb471bc9eb947376f45).However, by switching to the revision right before #161363 (
ccae8cc79480c854992cd093cf5b43bd4a9b50c9), I can reproduce the issue and see that the tooltip is blocking scrolls.The
doctorlog provided by the author noted version 3.29.2. #161363 is landed to stable at 3.30.I think this issue should have been fixed on the main channel, therefore I'm closing this issue. Please switch to the main channel, or (in the future) try with a stable version later than 3.29. Feel free to comment under this issue or open a new one if you find similar issues after so.
khlebobul commentedon May 10, 2025
Hello, I updated the version and tried adding
verticalOffset: -10. I don't consider this a solution to the issue, as there is still a position at which the scroll doesn't work properly.dkwingsmt commentedon May 10, 2025
I meant that the solution is to upgrade to the main channel, as a fix (#161363) has been landed. Once you've upgraded, you shouldn't need any extra offset for this issue to disappear.
The offset was regarding an earlier comment that it was impossible to make the tooltip appear under the cursor for reproduction.
github-actions commentedon May 26, 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.