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
{{ message }}
Repository navigation
e.preventDefault don't work on 'new-window' event? #2770
Activity
zcbenz commentedon Sep 14, 2015
Does it work as expected if you click with left mouse button?
metainfa commentedon Sep 14, 2015
Also don't work.
I click with left mouse button by link and go to url (e.preventDefault don't work).
zcbenz commentedon Sep 14, 2015
Can you share a small demo app? I'm not able to reproduce with your code snippet, so I'm wondering if it is caused by other parts of your code.
metainfa commentedon Sep 14, 2015
Ok.
metainfa commentedon Sep 14, 2015
I make demo app this link.
zcbenz commentedon Sep 14, 2015
Calling
event.preventDefaultdoesn't work in renderer process, because the callback is called asynchronously in renderer process andevent.preventDefaulthas to be called synchronously. You can find detailed descriptions at http://electron.atom.io/docs/v0.32.0/api/remote/#passing-callbacks-to-the-main-process.