mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
test: fix failing tests of focus/blur events of WebContents (#32724)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
@@ -516,6 +516,15 @@ Emitted when the `WebContents` loses focus.
|
||||
|
||||
Emitted when the `WebContents` gains focus.
|
||||
|
||||
Note that on macOS, having focus means the `WebContents` is the first responder
|
||||
of window, so switching focus between windows would not trigger the `focus` and
|
||||
`blur` events of `WebContents`, as the first responder of each window is not
|
||||
changed.
|
||||
|
||||
The `focus` and `blur` events of `WebContents` should only be used to detect
|
||||
focus change between different `WebContents` and `BrowserView` in the same
|
||||
window.
|
||||
|
||||
#### Event: 'devtools-opened'
|
||||
|
||||
Emitted when DevTools is opened.
|
||||
|
||||
Reference in New Issue
Block a user