-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PreventDefault on Close event stops function #80
Comments
is |
That's the issue I think yes. Debugging delegate is a bit of a pain because it doesn't show anything. Maybe we should wrap the handlers in a |
I can't think of any. The classic objection is performance, but I think it barely makes any difference and newer v8 can optimise around it. |
You are right, I didn't set event as param. I've tried to set is as param before and console.log it but this was crashing Sketch. That's why I unset it. I just found out it was actually sketch-dev-tools that was crashing |
I'm using the following code now. Now it does not stop the the function, but it also does not close the window. Any idea why? browserWindow.on("close", event => {
event.preventDefault();
console.log('this does show up');
}); |
I can't find a way to prevent from the window to close
But the window is still being closed, I'm trying to override the close button to just hide the window and not close it, is it possible? |
closing in favour of #136 |
When using
event.preventDefault()
or after touching theevent
variable within in the Close event, it stops running.For example:
or:
Any idea how to solve this? Thanks
The text was updated successfully, but these errors were encountered: