-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
status: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug
Description
Describe the bug
everything works fine on first load, but subsequent refreshes of the application result in
for each custom menu item added
Reproduction
No response
Expected behavior
No response
Full tauri info output
[✔] Environment
- OS: Mac OS 15.4.1 x86_64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.84.1 (e71f9a9a9 2025-01-27)
✔ cargo: 1.84.1 (66221abde 2024-11-19)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-x86_64-apple-darwin (default)
- node: 20.18.3
- pnpm: 10.7.1
- yarn: 1.22.22
- npm: 11.1.0
- deno: deno 2.2.12
[-] Packages
- tauri 🦀: 2.5.1
- tauri-build 🦀: 2.2.0
- wry 🦀: 0.51.2
- tao 🦀: 0.33.0
- @tauri-apps/api : 2.5.0
- @tauri-apps/cli : 2.5.0
[-] Plugins
- tauri-plugin-dialog 🦀: 2.2.1
- @tauri-apps/plugin-dialog : 2.2.1
- tauri-plugin-fs 🦀: 2.2.1
- @tauri-apps/plugin-fs : 2.2.1
- tauri-plugin-shell 🦀: 2.2.1
- @tauri-apps/plugin-shell : 2.2.1
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist/spa
- devUrl: http://localhost:9000/
- framework: Vue.js (Quasar)
- bundler: Vite
✨ Done in 13.76s.
Stack trace
Additional context
our code:
export const initMenu = async () => {
const dumyMenu = await Submenu.new({
items: [
await PredefinedMenuItem.new({
item: 'Quit',
}),
],
})
const fileMenu = await Submenu.new({
text: 'File',
items: [
await MenuItem.new({
id: 'newProject',
text: 'New Project',
action: () => {
// console.log('newProject')
newProject()
},
}),
await MenuItem.new({
id: 'openProject',
text: 'Open Project',
action: () => {
// console.log('openProject')
openProject()
},
}),
await MenuItem.new({
id: 'saveProject',
text: 'Save Project',
action: () => {
// console.log('saveProject')
saveProject()
},
}),
],
})
const editMenu = await Submenu.new({
text: 'Edit',
items: [
await PredefinedMenuItem.new({
item: 'Undo',
}),
await PredefinedMenuItem.new({
item: 'Redo',
}),
await PredefinedMenuItem.new({
item: 'Separator',
}),
await PredefinedMenuItem.new({
item: 'Cut',
}),
await PredefinedMenuItem.new({
item: 'Copy',
}),
await PredefinedMenuItem.new({
item: 'Paste',
}),
await PredefinedMenuItem.new({
item: 'SelectAll',
}),
],
})
const viewMenu = await Submenu.new({
text: 'View',
items: [
await PredefinedMenuItem.new({
item: 'Fullscreen',
}),
],
})
const windowMenu = await Submenu.new({
text: 'Window',
items: [
await PredefinedMenuItem.new({
item: 'Minimize',
}),
await PredefinedMenuItem.new({
item: 'Maximize',
}),
await PredefinedMenuItem.new({
item: 'Separator',
}),
await PredefinedMenuItem.new({
item: 'CloseWindow',
}),
],
})
const menu = await Menu.new({
items: [dumyMenu, fileMenu, editMenu, viewMenu, windowMenu],
})
const res = macOS ? await menu.setAsAppMenu() : await menu.setAsWindowMenu()
return res
}Metadata
Metadata
Assignees
Labels
status: needs triageThis issue needs to triage, applied to new issuesThis issue needs to triage, applied to new issuestype: bug