iOS 8 3rd party keyboards don’t register javascript/jQuery keyup, keypress, keydown etc

When using a 3rd party keyboard like Swiftkey javascript events like keypress don’t register. For example Google maps autocomplete won’t work

Seems like an iOS bug but any ideas on how I can get around this?

You can just manually fire keypress events.

$textBox = $('#text_box') // We don't want to search the dom more than we have to.
}, 500)

This is definitely a messy solution, but it should get autocomplete to work, as well as other handlers that wait for keypresses.

Would this work?

jQuery('#text_box').on('input propertychange paste', function() {
    // text has changed...


I found a solution using setInterval and the answered method from here Trigger Google Places Autocomplete

setInterval(function() {
if ($('input#mapSearch').is(':focus')) {
google.maps.event.trigger(document.getElementById('mapSearch'), 'focus', {});
}, 500);

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .
Read More:   How to import popper.js?

Similar Posts