On MacOS (Windows/Linux work fine) I am opening a modal window. The modal window opens up fine but focus behavior is broken. When I click on the main window (outside of modal) it gains the focus (which should not happen) and then the modal window gains focus (which is correct), but right after that the modal gains blur (which is wrong). Now if I try to focus the modal with mouse it does not do anything as the main window is focused.
Here I have created a demo which prints out to console which window is focused.
https://github.com/zarubond/electron-quick-start/tree/modal_focus
Preflight Checklist
Issue Details
- Electron Version:
Tested on Electron 3, 5, 6-beta4
- Operating System:
MacOS 10.13 (Windows 10 and Ubuntu 18.04 work fine)
- Last Known Working Electron version:
None
Expected Behavior
Main window should never get focused if the modal window is opened
Actual Behavior
Main window gains focused event if the modal window is opened.
To Reproduce
Open up the console to see which windows are getting focused and the open the modal with open button.
https://github.com/zarubond/electron-quick-start/tree/modal_focus
Screenshots

(ignore the last line, I had to switch to screen-short program)
On MacOS (Windows/Linux work fine) I am opening a modal window. The modal window opens up fine but focus behavior is broken. When I click on the main window (outside of modal) it gains the focus (which should not happen) and then the modal window gains focus (which is correct), but right after that the modal gains blur (which is wrong). Now if I try to focus the modal with mouse it does not do anything as the main window is focused.
Here I have created a demo which prints out to console which window is focused.
https://github.com/zarubond/electron-quick-start/tree/modal_focus
Preflight Checklist
Issue Details
Tested on Electron 3, 5, 6-beta4
MacOS 10.13 (Windows 10 and Ubuntu 18.04 work fine)
None
Expected Behavior
Main window should never get focused if the modal window is opened
Actual Behavior
Main window gains focused event if the modal window is opened.
To Reproduce
Open up the console to see which windows are getting focused and the open the modal with open button.
https://github.com/zarubond/electron-quick-start/tree/modal_focus
Screenshots
(ignore the last line, I had to switch to screen-short program)