Skip to content

[Web] Cannot scroll ListView when mouse is over the tooltip #183878

Closed

Description

@bambinoua

Steps to reproduce

  1. Place mouse pointer over the trailing icon and wait for a tooltip.
  2. Place mouse pointer over the tooltip.
  3. Try to scroll the listview.

Expected results

The list should be scrollable.

Actual results

The list is not scrollable.

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(
      debugShowCheckedModeBanner: false,
      title: 'ListView',
      theme: ThemeData(useMaterial3: true, colorSchemeSeed: Colors.blue),
      home: const ListScreen(),
    );
  }
}

class ListScreen extends StatelessWidget {
  const ListScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: 500,
        height:500,
        child: ListView.builder(
          itemCount: 50,
          itemBuilder: (context, index) {
            return ListTile(
              leading: CircleAvatar(child: Text('${index + 1}')),
              title: Text('Item Number ${index + 1}'),
              subtitle: const Text('Tap the icon for more info'),
              trailing: Tooltip(
                ignorePointer: true,
                message: 'Information for item ${index + 1}',
                child: IconButton(
                  icon: const Icon(Icons.info_outline),
                  onPressed: () {
                    // Action when button is pressed
                    ScaffoldMessenger.of(context).showSnackBar(
                      SnackBar(content: Text('Clicked icon $index')),
                    );
                  },
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}

Flutter Doctor output

Doctor output
flutter 3.41.2
revision 9067a4eef 2026-02-18 13:54:59 -08:00
dart 3.11
dev tools 2.54.1
windows 11 Pro
chrome

Activity

  1. changed the title [-][Web] Cannot scroll ListView when mouse is in over the tooltip[/-] [+][Web] Cannot scroll ListView when mouse is over the tooltip[/+] on Mar 19, 2026
  2. added
    framework
    f: scrolling
    platform-web
    has reproducible steps
    p: material_ui
    team-framework
    on Mar 20, 2026
  3. mbcorona commented on Mar 20, 2026

    @mbcorona
    Member

    Hi @bambinoua , thanks for reporting this issue and providing a minimal code sample that reproduces it. Routing to team-framework.

  4. added
    P2
    triaged-framework
    on Mar 24, 2026
  5. justinmc commented on Mar 24, 2026

    @justinmc
    Contributor

    Are we sure that this happens only on web?

  6. victorsanni commented on Mar 25, 2026

    @victorsanni
    Contributor

    Are we sure that this happens only on web?

    Yes, ran the repro on macOS and it scrolls normally, but it doesn't on Dartpad.

  7. added
    fyi-web
    on Apr 1, 2026
  8. added
    triaged-web
    on Apr 8, 2026
  9. flutter-zl commented on Apr 8, 2026

    @flutter-zl
    Contributor

    does removing ignorePointer: true help solve the issue?

  10. removed
    fyi-web
    triaged-web
    on Apr 8, 2026
  11. Alexqwesa commented on Apr 20, 2026

    @Alexqwesa

    does removing ignorePointer: true help solve the issue?

    for me it doesn't help

    flutter --version
    Flutter 3.41.6 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision db50e20 (4 weeks ago) • 2026-03-25 16:21:00 -0700
    Engine • hash 5cdd32777948fa7a648fac915f8da7120ac7e97a (revision 425cfb5) (25 days ago) • 2026-03-25 20:14:42.000Z
    Tools • Dart 3.11.4 • DevTools 2.54.2

    also: windows desktop - reproducible

    Also my workaround - is just manual tooltip(just text) that paints inside the widget subtree instead of a root overlay.
    class PassiveTooltip extends StatefulWidget {
      const PassiveTooltip({
        required this.child,
        required this.message,
        super.key,
        this.waitDuration = const Duration(milliseconds: 500),
        this.exitDuration = const Duration(milliseconds: 200),
        this.verticalGap = 14,
        this.horizontalGap = 14,
        this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
        this.decoration,
        this.textStyle,
      });
    
      final Widget child;
      final String message;
      final Duration waitDuration;
      final Duration exitDuration;
      final double verticalGap;
      final double horizontalGap;
      final EdgeInsetsGeometry padding;
      final Decoration? decoration;
      final TextStyle? textStyle;
    
      @override
      State<PassiveTooltip> createState() => _PassiveTooltipState();
    }
    
    class _PassiveTooltipState extends State<PassiveTooltip> {
      Timer? _showTimer;
      Timer? _hideTimer;
      bool _visible = false;
    
      @override
      void dispose() {
        _showTimer?.cancel();
        _hideTimer?.cancel();
        super.dispose();
      }
    
      void _scheduleShow() {
        _hideTimer?.cancel();
        if (_visible) return;
        _showTimer?.cancel();
        _showTimer = Timer(widget.waitDuration, () {
          if (!mounted || _visible) return;
          setState(() => _visible = true);
        });
      }
    
      void _scheduleHide() {
        _showTimer?.cancel();
        _hideTimer?.cancel();
        _hideTimer = Timer(widget.exitDuration, () {
          if (!mounted || !_visible) return;
          setState(() => _visible = false);
        });
      }
    
      Widget _buildBubble(BuildContext context) {
        final textTheme = Theme.of(context).textTheme;
        final decoration =
            widget.decoration ??
            BoxDecoration(
              color: Colors.black87,
              borderRadius: BorderRadius.circular(4),
            );
        final textStyle =
            widget.textStyle ??
            textTheme.bodySmall?.copyWith(color: Colors.white);
    
        return IgnorePointer(
          ignoring: true,
          child: Material(
            color: Colors.transparent,
            child: DecoratedBox(
              decoration: decoration,
              child: Padding(
                padding: widget.padding,
                child: Text(widget.message, style: textStyle),
              ),
            ),
          ),
        );
      }
    
      @override
      Widget build(BuildContext context) {
        return MouseRegion(
          opaque: false,
          onEnter: (_) => _scheduleShow(),
          onExit: (_) => _scheduleHide(),
          child: Stack(
            clipBehavior: Clip.none,
            children: [
              widget.child,
              if (_visible)
                Positioned.fill(
                  child: IgnorePointer(
                    ignoring: true,
                    child: Align(
                      alignment: Alignment.centerRight,
                      child: Transform.translate(
                        offset: Offset(widget.horizontalGap, -widget.verticalGap),
                        child: _buildBubble(context),
                      ),
                    ),
                  ),
                ),
            ],
          ),
        );
      }
    }
    
    
  12. self-assigned this
    on Apr 20, 2026
  13. added
    P1
    triaged-web
    and removed
    P2
    on Apr 20, 2026
  14. removed
    triaged-web
    on May 4, 2026
  15. flutter-triage-bot commented on May 4, 2026

    @flutter-triage-bot

    The triaged-web label is irrelevant if there is no team-web label or fyi-web label.

  16. flutter-zl commented on Jun 23, 2026

    @flutter-zl
    Contributor

    I can reproduce this on Windows Chrome with Flutter 3.41.2.

    I also tested the same demo(https://flutter-demo-42-before.web.app/) on current Flutter, the scroll works on Windows Chrome. I am closing this issue for now. Feel free to reopen this issue if the issue persists after you upgrade to the latest version.

  17. github-actions commented on Jul 14, 2026

    @github-actions

    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 -v and a minimal reproduction of the issue.

  18. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1f: scrollingframeworkhas reproducible stepsp: material_uiplatform-webteam-frameworktriaged-framework

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions