tauri-apps / tauri-apps/plugins-workspace

Dialog API issue with file selection [bug]

Open
#2,153 1 comment 0 reactions 0 assignees View on GitHub
platform: macos plugin: dialog type: bug
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

### Describe the bug

I'm trying to use the dialog API in my Tauri app, specifically the FileDialogBuilder to select files but I'm having some issues with the way it's shown on MacOS (see picture).

It always appears in the top right corner of the screen, overlayed by the menu bar. This file selection window cannot be moved. I'm calling the dialog like this:

FileDialogBuilder::new().pick_folder();

I've used the dialog API for simple Yes/No boxes and it works well so unsure what could be the cause.

Screenshot 2023-07-10 at 10 48 22

### Reproduction

I'm not doing anything special to reproduce this issue, just using to open the file dialog.
```
let file_selection = FileDialogBuilder::new().pick_folder();
```

### Expected behavior

The file selection dialog should not appear on top of the screen, overlayed by the menu bar and blocked (cannot resize it or move it at all).

### Platform and versions

```text
Environment
› OS: Mac OS 13.4.1 X64
› Node.js: 18.13.0
› npm: 9.3.0
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.25.1
› rustc: 1.70.0
› cargo: 1.70.0
› Rust toolchain: 1.70.0-aarch64-apple-darwin

Packages
› @tauri-apps/cli [NPM]: 1.2.3
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 1.4.0,
› tauri-build [RUST]: 1.4.0,
› tao [RUST]: 0.16.1,
› wry [RUST]: 0.24.1,

App
› build-type: bundle
› CSP: unset
› distDir: ../build
› devPath: http://localhost:3000/
› framework: React
› bundler: Webpack

App directory structure
├─ .husky
├─ docker
├─ node_modules
├─ public
├─ scripts
├─ .github
├─ src-tauri
├─ build
├─ .git
├─ .vscode
└─ src
```

### Stack trace

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.