Select List with multiple enabled doesn't fire onchange event on iPad

Question!

I have a form with a select list that allows users to choose multiple items. I am using

$('#my_form select').change(validateInput);

to fire an onChange event whenever an item is selected or de-selected in my select list. It works fine on my desktop machine but the validateInput function does not run on iPad. If I change my select list to set multiple selection to be false, then the onChange event fires just fine on iPad.



Answers

Use the blur event instead. When you have a select list with multiple selection enabled, iPad uses its own native UI overlay to facilitate the multiple selection. When this UI pops-up, the select list loses focus so blur event works similar to onChange event.

More info: http://bugs.jquery.com/ticket/7309



This video can help you solving your question :)
By: admin