fix: notify focus change right away rather not on next tick (#14453)
* fix: Notify focus change right away, not on next tick * fix: emit the JS blur/focus events on next tick to avoid race condition * address feedback from review * fix: bind deferred Emit() calls to a WeakPtr This is so that the deferred Emit() calls will be canceled if the TopLevelWindow is destroyed. * chore: remove wip/test code cruft * fix: make linter happy * Enable disabled tests * refactor: cleaner impl of EmitEventSoon() * Revert "Merge branch 'fix-win-focus' of github.com:electron/electron into fix-win-focus" This reverts commit 90576806eb271d059f0a215c67e9b4b04f7396a4, reversing changes made to 9c13e47779a3af78fe0970c1f3d6cd040a5354e6. * Restore 704722c1, which was removed in error. We apologise again for the fault in the subtitles. Those responsible for sacking the people who have just been sacked have been sacked.
This commit is contained in:
parent
03dac078d7
commit
af4f08e030
5 changed files with 21 additions and 21 deletions
|
@ -335,8 +335,7 @@ describe('webContents module', () => {
|
|||
})
|
||||
})
|
||||
|
||||
// TODO(alexeykuzmin): [Ch66] Enable the test. Passes locally.
|
||||
xdescribe('focus()', () => {
|
||||
describe('focus()', () => {
|
||||
describe('when the web contents is hidden', () => {
|
||||
it('does not blur the focused window', (done) => {
|
||||
ipcMain.once('answer', (event, parentFocused, childFocused) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue