Strange behavior for a UI displayed by CommandMenuButton or moi.ui.showMenu

 From:  mkdm
7904.1 
Hi Michael,

i'm trying to write a UI plugin that must contain also an inputbox placed in a menu displayed by a CommandMenuButton.

Just two questions...

1) How to force a Dialog or a Menu, opened via moi.ui.createDialog(...) or moi.ui.showMenu(...), to focus the inputbox, once displayed ?
The classic "<the element>.focus()" doesn't work.

2) If i show the plugin interface via a CommandMenuButton, or even programmatically via the moi.ui.showMenu(...),
i get a strange behavior that happens when i start to write something inside the inputbox.
After every key press, the inputbox loses the focus and i must click again in it to continue to write.
And furthermore, after every key press in the inputbox, the menu blinks for a fraction of second, as if it's recreates itself .

This behaviors not happens if i show the same plugin inside a dialog, created using moi.ui.createDialog(...).

Thank you for all and have a nice day!

Marco.

EDITED: 30 Mar 2016 by MKDM