Update select.js

Fixed select not closing when click events can't be propagated to the document.