tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] `menuOnLeftClick` isn't working on v1.1.1

Open seahindeniz opened this issue 2 years ago • 1 comments

Describe the bug

After upgrading my project to the latest version, I have noticed that the System Tray icon starts opening the context menu when I click on the tray icon

Reproduction

https://github.com/seahindeniz/tauri-left-click-menu-issue/tree/v1.1.1

  1. npm i
  2. npm run tauri dev
  3. Click on the system tray icon

Expected behavior

It should have the same behavior or similar behavior as in the previous version

Platform and versions

Environment › OS: Mac OS 12.5.1 X64 › Node.js: 16.15.0 › npm: 8.15.0 › pnpm: Not installed! › yarn: 1.22.19 › rustup: 1.25.1 › rustc: 1.63.0 › cargo: 1.63.0 › Rust toolchain: stable-aarch64-apple-darwin

Packages › @tauri-apps/cli [NPM]: 1.1.1 › @tauri-apps/api [NPM]: 1.1.0 › tauri [RUST]: 1.1.1, › tauri-build [RUST]: 1.0.4, › tao [RUST]: 0.14.0, › wry [RUST]: 0.21.1,

Stack trace

No response

Additional context

No response

seahindeniz avatar Sep 17 '22 07:09 seahindeniz

Based on this issue, I found the property menu_on_left_click of SystemTray doesn't seem to work after setting it in main.rs, no matter if the version is 1.0.5 or 1.1.1.

When the version is 1.0.5, the key that shows is whether tauri.config.json > systemTray > "menuOnLeftClick":false is set.

Not setting "menuOnLeftClick": false but calling .with_menu_on_left_click(false) in rust code is also useless.

On the contrary, setting "menuOnLeftClick": false, then calling .with_menu_on_left_click(true) in rust code is useless too.

Moon1102 avatar Sep 17 '22 10:09 Moon1102