fix select selection bug for chrome starting with 38

Fresh clean pull request for #1329