Menu: Added close on click outside using technique from popup #389

Closed
wants to merge 1 commit into from

2 participants

@kborchers
jQuery Foundation member

Menu: Added close on click outside using technique from popup

@jzaefferer
jQuery Foundation member

Did you test that change with other components that use menu, like autocomplete, popup, menubar?

@kborchers
jQuery Foundation member

I did not but will. Is there a place to see what components depend on a certain component? I know the docs show the dependencies for each component but is there a list that goes the other way showing a certain component is a dependency for other components?

@jzaefferer
jQuery Foundation member

Nope, but a search for "menu" within the repo pretty much confirms that its just autocomplete, menubar and popup.

@kborchers
jQuery Foundation member

All of the demos for autocomplete, menubar and popup still work properly. In fact, popup looks like it works better. Before this change to menu, if you had multiple levels of the menu and clicked outside, it closed but when you click the button again to show the menu, it opened those levels momentarily then closed them. This change closes all of the levels of the menu before the popup closes causing the menu to be reset on the next open.

I updated the commit because I forgot a semicolon after the bind in the previous commit.

@jzaefferer
jQuery Foundation member

Merged via cherry-pick, you had some unnecessary whitespace in there. Also verified the interaction with popup, works a lot better now. Thanks Kris!

@jzaefferer jzaefferer closed this Jul 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment