hi all,
i am making a custom menu for use in my wiki and it involves dropdown submenus that expand/collapse on button click.
however, in order to close the submenu you currently need to click the toggle button again.
how can i replicate the behavior of the advancedsearch results popup, closing the submenu automatically when anything (outside of the dropdown) is clicked? i have tried to dig into the advancedsearch tiddler to see how it is done but i can’t wrap my head around it, some help would be appreciated!
the submenus use <div> elements with background fill and relative position css applied to them. they toggle using the <$reveal> widget based on a state
field, which is toggled on button click. so, i am looking for a solution which can change a field value when anywhere outside the popup is clicked (but not hog the click like a giant invisible div would do).
thanks!
scribs