Fix the iPad issue and auto close after selection on select2