Merge pull request #6851 from electron/focused-web-contents-from-hidden-windows
Prevent web contents in hidden windows from reporting as focused
This commit is contained in:
commit
4e355355a9
2 changed files with 21 additions and 2 deletions
|
@ -70,4 +70,12 @@ describe('webContents module', function () {
|
|||
specWebContents.openDevTools()
|
||||
})
|
||||
})
|
||||
|
||||
describe('isFocused() API', function () {
|
||||
it('returns false when the window is hidden', function () {
|
||||
BrowserWindow.getAllWindows().forEach(function (window) {
|
||||
assert.equal(!window.isVisible() && window.webContents.isFocused(), false)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue