"onCloseRequested" can be caught if clicking "Close window" in taskbar, but it is bypassed if clicking customized "close" button in right-top of window
It is limitation of Tauri, Could you replace appWindow.close with other function? (I try to replace it with process.exit(), but it also cannot trigger 'tauri://close-requested' event :()
Modify titlebar.jsx to call your function manually before closing the window. At least until v2 is released. V2 should also add the tu title() function that is erroring at the moment.
"onCloseRequested" can be caught if clicking "Close window" in taskbar, but it is bypassed if clicking customized "close" button in right-top of window
It is limitation of Tauri, Could you replace
appWindow.close
with other function? (I try to replace it withprocess.exit()
, but it also cannot trigger 'tauri://close-requested' event :()Refer to: https://github.com/tauri-apps/tauri/issues/5288#issuecomment-1261501470 Refer another: https://github.com/tauri-apps/plugins-workspace/issues/254