Search code examples
javascriptjquerymobile-safari

this script works on my desktop but not in safari


using dropzone.js

dropzone.on("addedfile", function(file) {
   $('input#photo_title').focus();
});

is there some reason that this script does not work in Safari/iphone? It works just fine on my desktop.

Safari is up to date. i want to put the focus on the input with the mobile keyboard displayed and insert cursor displayed, instead the input is highlighted but must be clicked to bring the keyboard up/insert cursor up.


Solution

  • Set textbox focus in mobile safari

    it is not possible to use .focus() to bring up the keyboard in IOS. This is the design and from numerous web sources apparently there is nothing you can do about it.