Skip to content

Overlays close immediately after opening on iPadOS 26.1 #177992

Description

@hakonber

Steps to reproduce

  1. Launch the sample app below on an iPad device or simulator running iPadOS 26.1 (update Xcode to v26.1 to get the latest simulators).
  2. Tap the hamburger icon to open the end drawer.
  3. Observe that it closes immediately. Occasionally it will behave correctly and not close by itself.

Expected results

The end drawer should remain open until the user actively dismisses it.

Actual results

On iPadOS 26.1, the end drawer closes by itself just after opening.

On older iPadOS versions, including 26.0, it behaves correctly and stays open until dismissed.

Code sample

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

/// Flutter code sample for [Scaffold.endDrawer].

void main() => runApp(const EndDrawerExampleApp());

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(home: EndDrawerExample());
  }
}

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

  @override
  State<EndDrawerExample> createState() => _EndDrawerExampleState();
}

class _EndDrawerExampleState extends State<EndDrawerExample> {
  final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();

  void _closeEndDrawer() {
    Navigator.of(context).pop();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        title: const Text('Drawer Demo'),
      ),
      body: Center(
        child: Text('iOS 26.1 Drawer bug. Tap the hamburger icon to trigger'),
      ),
      endDrawer: Drawer(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              const Text('This is the Drawer'),
              ElevatedButton(
                onPressed: _closeEndDrawer,
                child: const Text('Close Drawer'),
              ),
            ],
          ),
        ),
      ),
      // Disable opening the end drawer with a swipe gesture.
      endDrawerEnableOpenDragGesture: false,
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Image

Logs

Logs
Launching lib/main.dart on iPad Air 11-inch (M3) in debug mode...
Running Xcode build...
Xcode build done.                                           11.6s
Syncing files to device iPad Air 11-inch (M3)...                    32ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on iPad Air 11-inch (M3) is available at: http://127.0.0.1:51132/VZCG7b-IIPk=/
The Flutter DevTools debugger and profiler on iPad Air 11-inch (M3) is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:51132/VZCG7b-IIPk=/

Application finished.

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.35.7, on macOS 15.6.1 24G90 darwin-arm64, locale en-NO)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2025.1)
[✓] VS Code (version 1.105.1)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!

Activity

  1. changed the title [-]Scaffold's endDrawer closes automatically on iPadOS 26.1[/-] [+]Scaffold endDrawer closes immediately after opening on iPadOS 26.1[/+] on Nov 4, 2025
  2. johnvuko commented on Nov 4, 2025

    @johnvuko

    I don't know if it's related, but since iOS 26.1, on physical iPads only (not iPhone), all overlays (PopupMenu, Dialog, BottomSheet) randomly dismiss themselves.

  3. tirth-patel-nc commented on Nov 5, 2025

    @tirth-patel-nc
    Member

    @johnvuko thanks for the detailed report. Seeing the same behaviour with latest SDK versions on iPad OS 26.1. It is working fine on iPad OS 26.0.

    I do not have a physical iPad. Issue is replicable on simulators as well.

    stable : 3.35.7
    master : 3.38.0-1.0.pre-428
    
    Screen.Recording.2025-11-05.at.1.30.56.PM.mov
  4. added
    platform-iosiOS applications specifically
    e: OS-version specificAffects only some versions of the relevant operating system
    team-iosOwned by iOS platform team
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    p: material_uimaterial_ui package in flutter/packages
    and removed
    in triagePresently being triaged by the triage team
    on Nov 5, 2025
  5. 65 remaining items

  6. added a commit that references this issue on Feb 20, 2026
  7. ilu55 commented on Feb 20, 2026

    @ilu55

    Currently , I solved this issue using the following code. If any one want's to use it as a temp solution. Generate one common file and load all your dialog from here so in future easy to fix for next change. Also you can add this only apply for ios based on your requirements.

    popupInitializer(Widget child) async {
      var result = await Navigator.of(context).push(
        PageRouteBuilder(
          opaque: false,
          barrierDismissible: true,
          transitionDuration: const Duration(milliseconds: 200),
          reverseTransitionDuration: const Duration(milliseconds: 150),
          pageBuilder: (pageContext, __, ___) {
            return Container(
              color: Colors.black54,
              child: SafeArea(
                child: GestureDetector(
                  onTap: () {
                    Navigator.pop(pageContext);
                  },
                  behavior: HitTestBehavior.opaque,
                  child: widget,
                ),
              ),
            );
          },
          transitionsBuilder:
              (buildContext, animation, secondaryAnimation, child) {
            return FadeTransition(opacity: animation, child: child);
          },
        ),
      );
    }
    
  8. added 3 commits that reference this issue on Feb 20, 2026
  9. gokhanikisivri commented on Feb 25, 2026

    @gokhanikisivri

    @LongCatIsLooong @jmagman Is this fix included in any stable version?

  10. added a commit that references this issue on Feb 27, 2026
  11. peedeeeff commented on Feb 28, 2026

    @peedeeeff

    I think the issue in iPadOS 26.x is that on tapping a button, say top left menu button, it registers 2 taps instead of 1.
    As a result, if there's a showModalBottomSheet, it gets dismissed immediately as the second tap is registered outside of the ModalBottomSheet. After an App review, I had to make is isDismissible: false, which is not ideal UX-wise.

    I realised this when in the next review, they pointed out how the top menu gets selected instantly when the Drawer opens. This confirms my 2 taps theory.

  12. github-actions commented on Mar 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.

  13. locked as resolved and limited conversation to collaborators on Mar 14, 2026
  14. added a commit that references this issue on Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: tabletTablets and landscape phonescustomer: crowdAffects or could affect many people, though not necessarily a specific customer.e: OS-version specificAffects only some versions of the relevant operating systeme: device-specificOnly manifests on certain devicesengineflutter/engine related. See also e: labels.found in release: 3.35Found to occur in 3.35found in release: 3.38Found to occur in 3.38frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions