-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Describe the bug
set_parent does not seem to work on macOS. When it's used, the file dialog should be attached to the window, like in the rfd winit example:

Reproduction
#[tauri::command]
pub async fn open(win: tauri::Window) -> Result<(), String> {
let mut d = tauri::api::dialog::FileDialogBuilder::new().set_parent(&win);
let (sender, receiver) = std::sync::mpsc::channel();
d.pick_file(move |p| {
sender.send(p).unwrap();
});
let file_path = match receiver.recv().unwrap_or_default() {
Some(p) => p,
None => return Ok(()),
};
println!("file_path {:?}", file_path);
Ok(())
}Expected behavior
No response
Platform and versions
Operating System - Mac OS, version 10.15.7 X64
Node.js environment
Node.js - 16.13.1
@tauri-apps/cli - 1.0.0-beta.10
@tauri-apps/api - 1.0.0-beta.8
Global packages
npm - 8.1.2
yarn - 1.22.17
Rust environment
rustc - 1.58.0
cargo - 1.58.0
App directory structure
/node_modules
/public
/src-tauri
/build
/.git
/src
App
tauri.rs - 1.0.0-beta.8
build-type - bundle
CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
distDir - ../build
devPath - http://localhost:5000
framework - SvelteStack trace
No response
Additional context
No response
Reactions are currently unavailable