Focus behaviour

I have a Window, with a very long Form in a scrolling fixed height container. To make it easier for the users to get to different “sections” within this form I have a MenuBar where the menu choices call focus() on the first field of the section to go to. This works fine. The Window also has ShortcutActions (currently bound to Shift-F1, Shift-F2, …) which work the same way. This works too, but with one difference from the MenuBar choices: if the focused field is a Select, it is not only focused, but the dropdown list is opened too. I suspect this might be because it started off with a keyboard event. Is there a way to prevent the Select dropdown from being opened here?

I created a ticket for this issue:
http://dev.vaadin.com/ticket/7539

In both cases, the element is focused in a XMLHttpRequest-event from the, so from that point of view there shouldn’t be any difference between clicking the menu item or triggering it with a shortcut key. There is however something interesting going on that causes the drop down to be opened.

Thanks for the quick look at this issue!