简体   繁体   中英

Nodejs electron: focusOut event?

I'm toying around with electron, the framework used for the atom text editor, but I'm having a little trouble finding a basic feature. I'm working on a little system tray gui that I want to pop up in that respective corner of the screen. When you click elsewhere on the screen, not on my window, I would like for the window to hide itself. For that, I would normally use a focusOut event callback or something similar. Does that event exist in electron, because all I've found is the focus event.

Are you talking about a BrowserWindow losing focus? If so the blur event seems to be what you're looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM