jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.7k stars 2.41k forks source link

on dropdown select causes focus to next control #8623

Closed muthuraman007 closed 6 years ago

muthuraman007 commented 6 years ago

I have form with many textbox and select tags. When i click the select tag its not opening the dropdown menu instead it move focus to next control that i have not selected. This issue occurs only in iPhone.

Please anyone help me to solve this.

muthuraman007 commented 6 years ago

To Stop automatically closing dropdown issue or stop switching to other element issue use preventDefault() method in touch event of the select element.

Example

 $("#dropDownID").on('touchstart', function (e) {           
  e.preventDefault();
  });