mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Check for devtools in BrowserWindow.getFocusedWindow() (#12526)
This commit is contained in:
committed by
Shelley Vohr
parent
82f8914f9e
commit
970f79e32f
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user