Check for devtools in BrowserWindow.getFocusedWindow() (#12526)

This commit is contained in:
Nitish Sakhawalkar 2018-04-06 06:21:32 -07:00 committed by Shelley Vohr
parent 82f8914f9e
commit 970f79e32f
2 changed files with 12 additions and 1 deletions

View file

@ -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
}