dojo.connect(bookmarks, 'onClick', function(evt) { dojo.query('.dijitDropDownButton').forEach(function(node,idx){ var btn = dijit.getEnclosingWidget(node); btn.closeDropDown(); }); });
It should be built into the sample. My button from the sample does collapse after I make a selection. If I select the Basemaps button, but then do nothing, it will stay open until I click anywhere in the window.OK, I see, there is a difference between the samples. The one I started with, here, does not collapse automatically, and is a "digit.TitlePane" rather than a "dijit.form.DropDownButton" as this one.