Skip to content

Instantly share code, notes, and snippets.

@dongyuwei
Created February 17, 2014 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dongyuwei/9045559 to your computer and use it in GitHub Desktop.
Save dongyuwei/9045559 to your computer and use it in GitHub Desktop.
fix multiple select bug for mobile safari
(function(){
//fix a special bug in mobile safari, see https://discussions.apple.com/message/23745665#23745665
var multiSelect = $('select[multiple]');
multiSelect.on('blur',function(){
var me = $(this);
me.data('value',me.val());
setTimeout(function(){
me.val(me.data('value'));
},600);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment