Reduce delay while selecting option in jquery mobile

607 views Asked by At

I have my application installed on an Android Device Samsung S4 which is built using Intel XDK. I have a select dropdown in the form having 40 options. When i tap on an option to choose, it chooses the option instantly but takes 2 seconds of delay before closing the opened options popup.

I have tried the following fix but it did not work as expected.

$(document).bind("mobileinit", function(){
    $.mobile.buttonMarkup.hoverDelay = 0;
    $.mobile.selectmenu.prototype.options.nativeMenu = true; //i also changed to false and didn't work either
});

Is there any other fix i can apply to reduce or remove the lag between choosing an option and closing the option box?

1

There are 1 answers

0
Khawer Zeshan On

Although this didn't work for me

$.mobile.selectmenu.prototype.options.nativeMenu = false;

But adding data-native-menu="false" to the select element it worked fine

<select name="year" id="year" data-theme="a" data-native-menu="false">