# ApplicationCommandManager menus not active - annoyance

**URL:** <https://forum.juce.com/t/applicationcommandmanager-menus-not-active-annoyance/13100>\
**Category:** General JUCE discussion\
**Created:** [July 2, 2014, 2:22pm UTC](https://forum.juce.com/t/applicationcommandmanager-menus-not-active-annoyance/13100 "2014-07-02T14:22:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [July 2, 2014, 2:22pm UTC](https://forum.juce.com/t/applicationcommandmanager-menus-not-active-annoyance/13100/1 "2014-07-02T14:22:37Z")

</div>

I posted this once, in a plugin instance the menu used in the eudio editor (it it's a document window) is greyed out unless some clicking is done on that menu or on some other component (i get a 100% hit rate if i click on the resizing corner component). This was explained as a focus issue.

I traced it down to the ApplicationCommandManager::findDefaultComponentTarget method that returns JUCEApplication::getInstance() that returns 0 since such instance does not exist. I was wondering could we maybe change that static method to include support for plugins ? Or a different way, what can i do in my code to work around the problem, grabbing keyboard focus in the editor constructor isn't helping, should i do that somewhere else, maybe that should be delayed ?

&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 2, 2014, 2:58pm UTC](https://forum.juce.com/t/applicationcommandmanager-menus-not-active-annoyance/13100/2 "2014-07-02T14:58:54Z")

</div>

It'd be tricky to change that method to handle plugins, because there isn't a list of all the plugin windows that are open..

One idea would be to call&nbsp;ApplicationCommandManager::setFirstCommandTarget() before opening the menu?

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [July 2, 2014, 3:09pm UTC](https://forum.juce.com/t/applicationcommandmanager-menus-not-active-annoyance/13100/3 "2014-07-02T15:09:19Z")

</div>

Thanks i will try that.
