Issue: I have a text input and a button (binding with knockout). Inside knockout click event I have a jquery focus which is working on any desktop but on any ios devices.
HTML:
<input class="form-control" type="text" id="SearchInput" data-bind="textInput:SearchInput" />
<input type="button" data-bind="click:BtnClicked ">
Model:
$('#SearchInput').on('touchstart', function (e) {
// It shows that we get here
$("p").text("I am here in touchstart");
$(this).focus();
});
/////
self.BtnClicked = function (){
$("#SearchInput").trigger('touchstart');
}
It works on any Android devices but it is not working on any ios devices (the latest Safari & Chrome). It goes inside touchstart
binding where I see <p>
is getting set with new text but no luck to make it work on an ipad. I've also tried both -webkit-user-select: none;
and -webkit-user-select: text;
still not working.