Skip to content

[flutter 3.41.0] Tooltip ignorePointer property not working #182468

Description

@bggRGjQaUbCoE

Steps to reproduce

use Tooltip with meesage instead of richMessage or set ignorePointer to true, after showing the tooltip, hover the tooltip, tooltip keeps visible on hover

Investigation:
before flutter 3.41.0:
IgnorePointer is outside the _ExclusiveMouseRegion
after flutter 3.41.0:
_ExclusiveMouseRegion is outside the IgnorePointer

Expected results

tooltip dissmissed on hover (flutter 3.38.x)

Actual results

tooltip keeps visible on hover (flutter 3.41.0)

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: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: .fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Tooltip(
          message: 'tooltip',
          // or this
          // ignorePointer: true,
          // richMessage: TextSpan(text: 'tooltip'),
          child: Icon(Icons.more_vert),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
no error log

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions