Open dennis0324 opened 1 year ago
This is a very weird bug, I am able to reproduce it so that's at least positive, but I have yet to find the cause for this. A plain Electron project does not have this issue, so there must be some kind of config or code interfering with setting the listener. As such, I tried to run the project without any preloads, meaning that there is no custom Vieb code running in the page, yet I still had this issue. So that indicates to me that this must be something to do with a setting of sorts. I'll let you know when i know more.
It seems like it is similar to this issue: https://github.com/electron/electron/issues/31018, in that changing the contextIsolation
value changes the behavior of this issue. If I enable contextIsolation
it starts working again, regardless of other Vieb code being loaded or not, when disabled it even breaks this in a plain Electron test project (with webview enabled and sandbox disabled to allow requiring modules) even without a preload. This means that the problem lies with Electron. I'll see if I can bring this back to a smaller test case, as the Electron team refuses to look into this if there is a dependency on big projects such as Next.js or React. One of those projects must be using something that is implemented differently in Electron when contextIsolation
is toggled, but I have yet to discover what that is.
Checklist
:help
documentation using/
for helpful informationDescribe the bug Nextjs
onClick
eventhandler won't fireTo Reproduce
folder tree looked like
Expected behavior vieb:
firefox browser:
additional information I tried
two of this and also refreshed
Specs
I tried my best to look at all of the documentation in
help
and others. If the solution exists I apologize.