Answer the question
In order to leave comments, you need to log in
IOS and JS "click" event?
Made a simple autocomplete on the site. We enter the first two letters of the word - a request is sent to the server, a list of results is returned, which is substituted as a “hint list”. The "list-hint" and the input field are not made in the form of a select-option tag, but a regular text input, under which there is an invisible div with hints.
As a result, under iOS, my autocomplete list is normally requested from the server, returned and displayed to the user. But, for some reason, in iOS, autocomplete items are not being clicked.
For me, the problem is aggravated by the fact that there is not a single iOS device at hand, so I can’t debug it, I can’t see the JS error console. The actual piece of code responsible for the “click” event on the autocomplete element:
$('#autocomplit p').live('click', function() {<br>
city_name = $(this).html();<br>
autocomplit.html('').css('display','none');<br>
city.val(city_name);<br>
<br>
city_guid = $(this).data('guid');<br>
});<br>
Answer the question
In order to leave comments, you need to log in
It seems that iOS devices do not allow clicking on all page elements, but only on links, elements with tabIndex and (possibly) elements with onclick. Instead of guessing on coffee grounds, I advise you to google the official document on the features of Safari in mobile devices on Apple's official website?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question