-
Notifications
You must be signed in to change notification settings - Fork 2.4k
iOS does not show keyboard on .focus() #3016
Comments
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. |
This now appears to be working under the button click. (iOS9 beta4) |
following code works on my mobile Safari, Chrome and also desktop browser
|
Guys, I have the opposite problem on my page right now. Every time I build the UI on my single page app the UI shows. There are not text input boxes at all! Nothing do to with this project, I just came across this discussion when searching for answers. |
Why was this closed? The problem still exists at 10.1.1. |
+1 any fix ? |
.focus is a core jquery method not jquery mobile so we wont be making any changes to focus within mobile |
Any chance someone has a link to this issue in jQuery's issue queue? I'm going to do my Google fu on this but thought a reference link would be quite helpful here. If I find anything, I'll try to circle-back and post my finidings. Please note: I found this issue because I'm looking for a solution to pop the iOS keyboard on :focus of my search input (type=search). |
@orthocenter he is totally right |
This has being worked for me.
|
I tried it's not working for me on page load I directly placed with out any event |
Safari accepts the focus event when it is inside a touch event handler. |
But how to do it on load? |
|
See what has worked for me across android and iOS
|
When I call .focus() on one of my text inputs or textareas, the iPhone keyboard does not automatically appear.
http://jsfiddle.net/kzUuG/1/
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.
The text was updated successfully, but these errors were encountered: