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](https://github.com/zarubond/electron-quick-start/tree/modal_focus)


### Preflight Checklist
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### 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](https://github.com/zarubond/electron-quick-start/tree/modal_focus)

### Screenshots
![image](https://user-images.githubusercontent.com/6961047/58539950-b3cdeb00-81f8-11e9-8678-da33f1b09b46.png)
(ignore the last line, I had to switch to screen-short program)

shell/browser/native_window.h
virtual void SetSheetOffset(const double offsetX, const double offsetY);
  virtual double GetSheetOffsetX();
  virtual double GetSheetOffsetY();
  virtual void SetResizable(bool resizable) = 0;
  virtual bool MoveAbove(const std::string& sourceId) = 0;
  virtual void MoveTop() = 0;
  virtual bool IsResizable() = 0;
  virtual void SetMovable(bool movable) = 0;
  virtual bool IsMovable() = 0;
  virtual void SetMinimizable(bool minimizable) = 0;
  virtual bool IsMinimizable() = 0;
  virtual void SetMaximizable(bool maximizable) = 0;
  virtual bool IsMaximizable() = 0;
  virtual void SetFullScreenable(bool fullscreenable) = 0;
  virtual bool IsFullScreenable() = 0;
  virtual void SetClosable(bool closable) = 0;
  virtual bool IsClosable() = 0;
  virtual void SetAlwaysOnTop(ui::ZOrderLevel z_order,
                              const std::string& level = "floating",
                              int relativeLevel = 0) = 0;
  virtual ui::ZOrderLevel GetZOrderLevel() = 0;
  virtual void Center() = 0;
  virtual void Invalidate() = 0;
  virtual void SetTitle(const std::string& title) = 0;
  virtual std::string GetTitle() = 0;
  
  void SetAccessibleTitle(const std::string& title);
  std::string GetAccessibleTitle();
  virtual void FlashFrame(bool flash) = 0;
  virtual void SetSkipTaskbar(bool skip) = 0;