opened
envex
username_0
* Electron Version: Electron 2.0.0
* Operating System (Platform and Version): macOS High Sierra 10.13.6 (17G65)

**Expected Behavior**

Ideally the `setApplicationMenu` event is ignored, or the menu items are updated. 

This may not be a bug, but if the event can't be ignored, it would be nice to have a method of checking if the menu has focus, so I can not call `setApplicationMenu`.

**Actual behavior**

Calling `setApplicationMenu` while the top menu has focus "crashes" the menu.

**To Reproduce**

- Load up the app on the `set-menu-bug`.
- Press down on a menu item and don't mouseup.
- Once the `setInterval` tries to update the menu, you'll notice the menu crashes.

Video: https://www.dropbox.com/s/pzgq3fa4gl4655n/set-menu-bug.mov?dl=0

Branch: https://github.com/username_0/electron-quick-start/tree/set-menu-bug

```sh
$ git clone git@github.com:username_0/electron-quick-start.git -b set-menu-bug
$ npm install
$ npm start || electron .
```
Calling setApplicationMenu when the menu has focus removes the submenu
issue
created
envex
username_0
Thank you!
comment
created
sethlu
username_1
@username_0 Would you mind checking if the same issue occurs in Electron 3 too? (I think it's prolly fixed 🤔 now.)

@username_2 I made this PR a while ago that went into Electron 3: https://github.com/electron/electron/pull/12809
comment
created
envex
username_0
@username_1 Will check right now.
comment
created
sethlu
username_1
@username_0 Glad to hear about that 😺 

@MarshallOfSound @username_2 Shall we back port https://github.com/electron/electron/pull/12809 to Electron 2?
comment
created
codebytere
username_2
@username_1 i'd say so, on it rn!
comment
created
envex
username_0
@username_1 Thank you!
comment