On show of PopUpmenu focus is given to popUpMenu


#1

Hey,

I have few doubts, want to ask, Please answer.

I have one textEditor, on it's textChange i am showing popupmenu with searched data, but each time I show menu, by calling menu.show/showAt/showMenuAsync, I lost focus from textEditor, I want focus to stay on textEditor, How it is possible ?

Other is, When i show menu, if menu has more data to show, it hides textEditor and show big menu above it, I want my menu to start always from below the textEditor, I tried with showAt, and Option of Popupmenu with componentToAttach or by giving specific coordinates of parent or desktop as well,  But no luck.

Can any one please suggest how can I achieve above ?

Thanks.

 


#2

Well the focus will come back to the text editor when the menu goes away, but while the menu is showing, the menu deliberately takes key focus so that it can handle cursor up/down + enter keys to select an item.


#3

True,

so that's how right now it is, like press enter/escape to come back to textEditor and type. Is there way to achieve functionality i am asking ? 


#4

No, it's not something I've ever considered.


#5

Would it be possible to make it an option for popups to NOT take keyboard focus? In our case, it’s also sending key presses to parent components that don’t have (or want) keyboard focus when the popup is open.