I'm trying to set up some proper object tree that resembles a dropdown menu.
I managed to set up an object tree that resembles a dropdown menu. But now I'm struggling with manually setting focus to a sub menu. I know that I am on the correct item, but executing focus()
on it doesn't seem to have the expected effect. I have prepared a codepen which illustrates the problem:
http://codepen.io/jmuheim/pen/fAjcx
In the output window, press tab until you're on "Programming languages". Then press enter to open the submenu. Now if you press "down", I'd expect the first item "Ruby" to gain focus. But it doesn't. Take a look at the handleDown
function in RootParentItem
class to see the corresponding code.