iphone - How do I cancel a text field edit in a UIWebView? -


I am working on an application with an embedded UIWebView.

The user has the ability to log into an attempt to find the current location using the core space in one place in a text field in the web view.

If the core location comes with the exact answer and the user is currently editing the location, then you want to cancel the edit and want to programmatically populate the location field. It is based on the assumption that most of the time users want to use their current location and if they are editing the fields, they will not do it that it was automatically populated and their location must be finished.

My question is, how can I cancel editing in a UIWebView? If this was a normal text entry field, I would first force the respondent to resign and the keyboard will run, but I do not know how to do this with a UIWebView sending resignation does not do the first rear ponder in the web view. .

Is there anything that can be done with javascript and string javascript forwarding: on web view? Is there any other way?

Your best bet is the JavaScript approach, look at the form field focus values ​​and see if you focus on it can leave.

It looks like what you want:

  window.blur ();  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -