fix: BrowserWindow.fromBrowserView in multiple-BrowserView windows (#26493)
This commit is contained in:
parent
040ee66678
commit
7c2ac6b7c1
2 changed files with 18 additions and 6 deletions
|
@ -96,11 +96,7 @@ BrowserWindow.fromWebContents = (webContents: WebContents) => {
|
|||
};
|
||||
|
||||
BrowserWindow.fromBrowserView = (browserView: BrowserView) => {
|
||||
for (const window of BrowserWindow.getAllWindows()) {
|
||||
if (window.getBrowserView() === browserView) return window;
|
||||
}
|
||||
|
||||
return null;
|
||||
return BrowserWindow.fromWebContents(browserView.webContents);
|
||||
};
|
||||
|
||||
BrowserWindow.prototype.setTouchBar = function (touchBar) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue