How to prevent app from interrupting macOS system shutdown? #869
Unanswered
abelparayil
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have implemented a feature where the app doesn't quit at all and in Mac what it does is that when clicking on the red button it just minimizes the app. I have tried using many ways but came up with one way where it worked and that was to ipc along with onbeforeunload
I injected a javascript like below
which gets handled by this
The issue that I'm facing is that when I'm to shut down the system it goes into an infinite loop, I guess, making the app minimize again and again instead of quitting it, which interrupts the shutdown. I have tried adding
Electron.App.On("app-before-quit")
But adding any code related to Electron.App.On just breaks my app and I don't know the reason behind it. I was thinking just like how I came across onbeforeunload is there some javascript code that I can add to make it work?
Beta Was this translation helpful? Give feedback.
All reactions