Skip to content


iOS does not show keyboard on .focus() #3016

offsky opened this Issue · 5 comments

5 participants


When I call .focus() on one of my text inputs or textareas, the iPhone keyboard does not automatically appear.

Tested on iPhone 4 running iOS5. This may be a jquery issue instead of jquerymobile, Im not sure. But, it would be nice if there was some workaround either way.


As far as I know it isn't possible to show the iOS keyboard via javascript. You can focus an element, Safari will draw a blue "focused" border, but it won't raise the keyboard.

I'd be eager to learn a workaround if there's one.


iOS won't, as far as I can tell from testing, show the keyboard without some kind of user interaction.

Trying a setTimeout to load it doesnt work. But setting the focus on another element's onClick event brings it up.

I believe this should be closed as an invalid bug.


Yeah, unfortunately, I’m third-ing this one: I’ve yet to find a way to trigger the iOS keyboard on focus.

@Wilto Wilto closed this

This now appears to be working under the button click. (iOS9 beta4)


following code works on my mobile Safari, Chrome and also desktop browser

// div is some selected element
                var f = function(event) {
                    $timeout(function() { // angular way, setTimeout is OK
                var mobile = false;
                div.on('click', function(event) {
                    if(mobile) return;

                div.on('touchstart', function(event) {
                    mobile = true;

                div.on('touchend', function(event) {
@slorber slorber referenced this issue in JedWatson/react-tappable

event argument is not provided to onTap consistently #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.