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
Fix webview usage with electron 21 #1777
Conversation
webview are deprecated and not formerly integrated / maintained in electron updating electron broke previous handleding of new window oppened from a webview use setWindowOpenHandler on the webview webContents to handle openning new cf. electron/electron#31117 (comment) also, there seem to be issues between webview and React cf. electron/electron#6046
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
|
Codecov ReportBase: 47.66% // Head: 47.66% // No change to project coverage π
Additional details and impacted files@@ Coverage Diff @@
## feat/electron-21 #1777 +/- ##
===================================================
Coverage 47.66% 47.66%
===================================================
Files 691 691
Lines 30426 30426
Branches 7978 7954 -24
===================================================
Hits 14502 14502
- Misses 14706 15860 +1154
+ Partials 1218 64 -1154
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. β View full report at Codecov. |
@chabroA Please use changeset next time as this is pretty important ! @gre @hedi-edelbloute please make sure a changeset is included when reviewing critical topics like these I know this is not going directly into |
π Description
cf. https://ledgerhq.atlassian.net/browse/LIVE-4335?focusedCommentId=247299
In a breaking change in Electron 18 the nativeWindowOpen web preference (used here) have been removed (cf. this PR)
Now, Ledger live does not seem to receive (and handle) new-window events when a live-apps wants to open a new window (regularly used throughout Live Apps to open external contextual info like redirect to Twitter account, open ToS page, etcβ¦)
webview
are deprecated and not formerly integrated / maintained in electron.updating electron broke previous handleding of new window opened from a
webview
use
setWindowOpenHandler
on thewebview
webContents to handle opening new window.cf. electron/electron#31117 (comment)
also, there seem to be issues between
webview
and Reactcf. electron/electron#6046
PS: this solution works as is. It might not be the most beautiful. Feel free to use it as a base version and improve on it if need be.
β Context
β Checklist
πΈ Demo
π Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.