You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the following method to construct a tray menu. When the mouse clicks on this tray menu, the page in the entire window cannot trigger click events, such as the button click event.
pubfn run(){
tauri::Builder::default().plugin(tauri_plugin_opener::init()).setup(|app| {let quit_i = MenuItem::with_id(app,"quit","Quit",true,None::<&str>)?;let menu = Menu::with_items(app,&[&quit_i])?;let tray = TrayIconBuilder::new().menu(&menu).menu_on_left_click(true).on_menu_event(|app, event| match event.id.as_ref(){"quit" => {println!("quit menu item was clicked");
app.exit(0);}
_ => {println!("menu item {:?} not handled",[event.id](http://event.id/));}}).build(app)?;Ok(())}).invoke_handler(tauri::generate_handler![greet]).run(tauri::generate_context!()).expect("error while running tauri application");}
Describe the bug
Use the following method to construct a tray menu. When the mouse clicks on this tray menu, the page in the entire window cannot trigger click events, such as the button click event.
20250507-215202.mp4
Reproduction
No response
Expected behavior
No response
Full
tauri infooutputStack trace
Additional context
No response