Check for devtools in BrowserWindow.getFocusedWindow() (#12526)
This commit is contained in:
parent
82f8914f9e
commit
970f79e32f
2 changed files with 12 additions and 1 deletions
|
@ -134,7 +134,7 @@ BrowserWindow.prototype._init = function () {
|
|||
|
||||
BrowserWindow.getFocusedWindow = () => {
|
||||
for (let window of BrowserWindow.getAllWindows()) {
|
||||
if (window.isFocused()) return window
|
||||
if (window.isFocused() || window.isDevToolsFocused()) return window
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue