c2r0b / tauri-plugin-context-menu

Native Context Menu in Tauri v1
https://crates.io/crates/tauri-plugin-context-menu
MIT License
133 stars 7 forks source link

Bug: Listeners should be properly removed #7

Closed egoist closed 1 year ago

egoist commented 1 year ago

https://github.com/c2r0b/tauri-plugin-context-menu/blob/af0e1134b407ee3d5c87df326da4a8d9bedddb33/webview-src/index.ts#L24

Every time you call showMenu a new listener for theevent function will be created, previous ones are not removed currently, which results in the function being called multiple times.

c2r0b commented 1 year ago

Fixed in version 4.0.1 of the TS Utility package (tauri-plugin-context-menu) #8.

Thank you for reporting 🙏