Skip to content

The Tooltip inside the ModalBottomSheet cannot be displayed after showMenu. #168545

@yiiim

Description

@yiiim

Steps to reproduce

  1. Run this code.
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Builder(
            builder: (context) {
              return TextButton(
                onPressed: () {
                  showModalBottomSheet(
                    context: context,
                    builder: (context) {
                      return Material(
                        child: Center(
                          child: Column(
                            children: [
                              const Tooltip(
                                message: "Tooltip",
                                child: Text("Tooltip"),
                              ),
                              TextButton(
                                onPressed: () {
                                  showMenu(
                                    position: RelativeRect.fill,
                                    context: context,
                                    items: [
                                      const PopupMenuItem(child: Text("item 1")),
                                    ],
                                  );
                                },
                                child: const Text("show menu"),
                              ),
                            ],
                          ),
                        ),
                      );
                    },
                  );
                },
                child: const Text(
                  "Click",
                ),
              );
            },
          ),
        ),
      ),
    );
  }
}
  1. Click the button in the center
  2. Click show menu
  3. Tap on a blank area to hide the menu.
  4. Hover the mouse over the Tooltip.

Expected results

The Tooltip is displayed.

Actual results

No Tooltip.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screen.Recording.2025-05-08.at.22.28.01.mov

Logs

No response

Flutter Doctor output

Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 3.32.0-1.0.pre.466, on macOS 14.5 23F79 darwin-arm64, locale en-CN)
! Flutter version 3.32.0-1.0.pre.466 on channel [user-branch] at /Users/ybz/ybz/source/github/flutter
Currently on an unknown channel. Run flutter channel to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
✗ cmdline-tools component is missing.
Try installing or updating Android Studio.
Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure to set the ANDROID_HOME environment variable.
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.99.3)
[✓] VS Code (version 1.80.0)
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.32Found to occur in 3.32frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions