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

Multiple windows with different menu not working as expected #11991

Open
shalapatil opened this issue Dec 17, 2024 Discussed in #11990 · 1 comment
Open

Multiple windows with different menu not working as expected #11991

shalapatil opened this issue Dec 17, 2024 Discussed in #11990 · 1 comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@shalapatil
Copy link

Discussed in #11990

Originally posted by shalapatil December 17, 2024
I am working on tauri app with next js.

    tauri::Builder::default()
        .setup(|app| {
            let app_handle = app.handle();

            // Create the "main" window with its menu
            let main_window = WindowBuilder::new(
                &app_handle,
                "main".to_string(),
                tauri::WindowUrl::App("/".into()),
            )
            .menu(create_main_menu()) // Attach the main menu
            .visible(false) // Hidden by default
            .build()?;
            println!("Main window created: {:?}", main_window);
    
            // Create the "onboarding" window with its menu
            let onboarding_window = WindowBuilder::new(
                &app_handle,
                "onboarding".to_string(),
                tauri::WindowUrl::App("/onboarding".into()),
            )
            .menu(create_onboarding_menu()) // Attach the onboarding menu
            .build()?;
            println!("Onboarding window created: {:?}", onboarding_window);
    
    
            Ok(())
        })
        .run(tauri::generate_context!())
        .expect("error while running Tauri application");

Onboarding window is created at last. onboarding menu is only getting shown for main window as well.

What could be the issue?

thank you!

@FabianLars
Copy link
Member

could you please show us the output of the tauri info command so we know the platform and versions we're talking about?

@FabianLars FabianLars added type: bug status: needs triage This issue needs to triage, applied to new issues labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants