Skip to content

[DropdownMenu] menu appears behind the keyboard #123395

@paul-charlton

Description

@paul-charlton

Steps to Reproduce

  1. Tap on textfield part
  2. Menu appears
  3. After tiny delay keyboard appears over the top of the menu
  4. Tap the textfield twice to hide and show the menu and it appears in the correct place

Expected results:
Menu show where it is not hidden

Actual results:
Menu hidden

Code sample
import 'package:flutter/material.dart';

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

  @override
  Widget build(BuildContext context) {
    final List<DropdownMenuEntry> years = List.generate(20, (i) {
      final val = (DateTime.now().year - i).toString();
      return DropdownMenuEntry(value: val, label: val);
    });
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        DropdownMenu(
          hintText: 'Placeholder',
          dropdownMenuEntries: years,
          menuHeight: 300,
        ),
      ],
    );
  }
}

Logs
[√] Flutter (Channel stable, 3.7.6, on Microsoft Windows [Version 10.0.22621.1413], locale en-GB)
    • Flutter version 3.7.6 on channel stable at C:\sdks\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12cb4eb7a0 (3 weeks ago), 2023-03-01 10:29:26 -0800
    • Engine revision ada363ee93
    • Dart version 2.19.3
    • DevTools version 2.20.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\pchar\AppData\Local\Android\Sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Professional 2022 17.5.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Professional
    • Visual Studio Professional 2022 version 17.5.33516.290
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.76.2)
    • VS Code at C:\Users\pchar\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.60.0

[√] Connected device (4 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 13 (API 33) (emulator)
    • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.1413]
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 111.0.5563.110
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 111.0.1661.51

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

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.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions