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
Encountered an issue where minimizing and then attempting to close a Tauri application. Results in the close handler losing its scope. This prevents the close handler from functioning as expected.
The application is set up to intercept the WINDOW_CLOSE_REQUESTED event and prevent the default behavior, which typically closes the application. Instead, it invokes a Tauri command to hide the window. The application features a system tray implementation which allows it to remain open in the background and can be reopened with a click event on the system tray icon.
Additional Notes
This issue seems to be triggered by specific interactions with window size adjustments and the taskbar functionalities when the application is in a minimized state.
I also have not tested this on Mac and may exist there too.
Reproduction
Run the application using npm run tauri dev.
Right-click the application icon in the taskbar and choose "Pin to taskbar".
Optionally, click "Close" on the application window to observe it hiding instead of closing.
Click the Tauri icon in the system tray to display the window again. (Note: Clicking the icon pinned to the taskbar won't show the window in dev mode.)
Simultaneously press Win + Up Arrow and Win + Down Arrow to alternate window size. During this, right-click the pinned taskbar icon and choose "Close", while continuing to alternate window size with the arrows.
Attempt to close the application by clicking the 'X' button; observe that the application does not hide as expected, indicating a malfunction.
Expected behavior
The close handler to continue to function as a close handler
tance77
changed the title
[bug] Tauri App's Close Functionality Fails After Minimize/Maximize Actions
[bug] Tauri App's Close Functionality Fails After Minimize/Maximize Actions (Windows)
Apr 18, 2024
Describe the bug
Encountered an issue where minimizing and then attempting to close a Tauri application. Results in the close handler losing its scope. This prevents the close handler from functioning as expected.
Minimal Reproduction Example
GitHub Repository
Behavior Observed
The application is set up to intercept the
WINDOW_CLOSE_REQUESTED
event and prevent the default behavior, which typically closes the application. Instead, it invokes a Tauri command to hide the window. The application features a system tray implementation which allows it to remain open in the background and can be reopened with a click event on the system tray icon.Additional Notes
This issue seems to be triggered by specific interactions with window size adjustments and the taskbar functionalities when the application is in a minimized state.
I also have not tested this on Mac and may exist there too.
Reproduction
npm run tauri dev
.Win + Up Arrow
andWin + Down Arrow
to alternate window size. During this, right-click the pinned taskbar icon and choose "Close", while continuing to alternate window size with the arrows.Expected behavior
The close handler to continue to function as a close handler
Full
tauri info
outputStack trace
No response
Additional context
Minimize_Maximize_Single_Instance_Bug.mp4
The text was updated successfully, but these errors were encountered: