[Bug]: BrowserWindow.fromWebContents does not work with WebContentsView WebContents #42060
Closed
3 tasks done
Labels
30-x-y
31-x-y
component/WebContentsView
enhancement ✨
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/all
Preflight Checklist
Electron Version
30.0.2
What operating system are you using?
Windows
Operating System Version
Windows 10 22H2 19045.2491
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Calling BrowserWindow.fromWebContents(web) where web is the WebContents of a BrowserView that belongs to a BrowserWindow currently returns the associated BrowserWindow.
As such, I would expect calling BrowserWindow.fromWebContents(web) where web is the WebContents of a WebContentsView that belongs to a BrowserWindow to return the associated BrowserWindow.
Actual Behavior
Calling BrowserWindow.fromWebContents(web) where web is the WebContents of a WebContentsView that belongs to a BrowserWindow does not return the associated BrowserWindow.
Testcase Gist URL
https://gist.github.com/neobyteUK/ea714d9f6493fb2dbcc1870b27eaaf2d
Additional Information
Code is so small to replicate, have also included screenshot.
The text was updated successfully, but these errors were encountered: