Hmm, this is pretty grim, but I guess it's the only option apart from changing this to use a listener on document to dismiss the menu rather than a giant div that covers everything. Maybe deserves an XXX?