开发者

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

开发者 https://www.devze.com 2023-01-22 10:32 出处:网络
I have a form with a select list that allows users to choose multiple items. I am us开发者_运维百科ing

I have a form with a select list that allows users to choose multiple items. I am us开发者_运维百科ing

$('#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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消