Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCalling `preventDefault` does not always have documented effect for `will-prevent-unload` events #20330
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following snippet run in the main process where one wants to listen for
"will-prevent-default"events and after some asynchronous operation (do_something, a call which returns aPromise) initiated by the event listener, depending on the result (result) of the operation, callpreventDefaulton the event to allow page to unload:One would expect
preventDefaultto work as documented regardless of when it is called?Is this a known issue, and is this simply a bug?
Electron 6.0.10 win32 x64
Microsoft Windows 10 64-bit Enterprise build 1709