Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pickFiles dialog does not receive focus on macOS #1445

Open
1 of 4 tasks
Hixie opened this issue Feb 13, 2024 · 5 comments
Open
1 of 4 tasks

pickFiles dialog does not receive focus on macOS #1445

Hixie opened this issue Feb 13, 2024 · 5 comments
Assignees
Labels
bug Something isn't working feature-candidate This issue might result in a feature to be implemented

Comments

@Hixie
Copy link

Hixie commented Feb 13, 2024

Describe the bug

I try to open an "open" dialog as follows, in reaction to a click on a material button:

Future<PlatformFile?> openFile(
  BuildContext context, {
  required String title,
  required String extension,
}) async {
  Navigator.push(context, _createModalBackdrop());
  try {
    FilePickerResult? result = await FilePicker.platform.pickFiles(
      dialogTitle: title,
      type: FileType.custom,
      allowedExtensions: [extension],
      withReadStream: true,
      lockParentWindow: true,
    );
    return result?.files.single;
  } finally {
    // ignore: use_build_context_synchronously
    Navigator.pop(context);
  }
}

...and the dialog pops up above my macOS application, but the open files dialog is not focused; the app retains focus.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version

macOS 14.2.1

Flutter Version details

ianh@coupari app % flutter doctor -v
[✓] Flutter (Channel main, 3.20.0-7.0.pre.31, on macOS 14.2.1 23C71 darwin-arm64, locale en-US)
    • Flutter version 3.20.0-7.0.pre.31 on channel main at /Users/ianh/dev/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 5025681129 (55 minutes ago), 2024-02-13 21:48:41 +0000
    • Engine revision 0091a4914d
    • Dart version 3.4.0 (build 3.4.0-138.0.dev)
    • DevTools version 2.33.0-dev.6

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[!] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    ✗ Unable to get list of installed Simulator runtimes.
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.85.2)
    • VS Code at /Users/ianh/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.82.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.2.1 23C71 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.2.1 23C71 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 121.0.6167.184

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.
ianh@coupari app % 
@Hixie Hixie added the new issue An issue that hasn't yet been seen from the maintainer label Feb 13, 2024
Copy link

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Feb 21, 2024
@amrgetment
Copy link
Contributor

+1 to remove stale label

@github-actions github-actions bot removed the stale label Feb 22, 2024
Copy link

github-actions bot commented Mar 1, 2024

This issue is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale label Mar 1, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@Hixie
Copy link
Author

Hixie commented Mar 18, 2024

I mean, the bug is still real, whether it's open or not. :-)

@navaronbracke navaronbracke self-assigned this Apr 18, 2024
@navaronbracke navaronbracke added bug Something isn't working feature-candidate This issue might result in a feature to be implemented and removed new issue An issue that hasn't yet been seen from the maintainer stale labels Apr 18, 2024
@navaronbracke navaronbracke reopened this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature-candidate This issue might result in a feature to be implemented
Projects
None yet
Development

No branches or pull requests

3 participants