[LeftNav] Closing left-nav via keyboard when nested menu is open fails to close nested menu.
- Open left nav that has a nested menu.
- Open the nested menu.
- Press esc to close the left nav.
Note that the nested menu is still visible.
This is on Chrome 39.0.2171.71 on OSX.
A cursory examination of the code suggests that the problem is that _onParentItemClick isn't called in this codepath -- I.E. there's an implicit dependency in the left nav on the nested menu to maintain its own state properly. Perhaps centralizing state control into the left nav component would make it easier to manage complex cases?
I think we have two options. First, make the NestedMenu WindowListenable to the ESC key just like left-nav. This does not centralize state control to the left-nav but it does provide the capability of closing nested menus without requiring the user to 'click off'. The second is to create a close() method in Menu that will close NestedMenus and then call this method from the close() of the left-nav.
Both solutions are nice; NestedMenus can be closed from the keyboard with the first and the second provides programmatic means of closing NestedMenus. I can't think of a use case for programmatic closing so I'm personally leaning towards option 1. Thoughts?
This seems to be fixed now, right? @oliviertassinari
I have just tested it. This seems to be fixed.