Would it be better to bind to mouseup? As a user I think I expect that if I click then hold then release elsewhere that the click action won't occur. 

A brief experiment suggests that just changing this event handler from click wouldn't be sufficient - the menu disappears on the mouseup event, but the action occurs too.