Fixed issue where the control may not close if click events can't be propagated to the document