This is a migrated thread and some comments may be shown as answers.

Hiding the iOS keyboard on blur

2 Answers 82 Views
NativeScript Insiders
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
TJ
Top achievements
Rank 1
TJ asked on 09 Jan 2015, 03:52 PM
Hey all,

I have a series of forms with TextFields, and I want to hide the keyboard when the user taps outside of them. I think this is a pretty common thing to do in iOS apps, but I have no idea how to accomplish this in NativeScript. Can someone help me out?

Thanks,
TJ

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 13 Jan 2015, 08:26 AM
Hi,

In fact, this is not so easy in iOS as it is in Android. We have still not thought of a way to do this from the control instance, i.e. to tell the TextField to hide the keyboard when the user taps outside. Here is one thing I found out, but it involves writing platform-specific code:

http://stackoverflow.com/questions/5306240/iphone-dismiss-keyboard-when-touching-outside-of-textfield

I am currently trying to find a way to achieve this without forcing the developer to write platform-specific code. I will let you know when I invent something.

Regards,
Rossen Hristov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
tommy
Top achievements
Rank 1
answered on 06 Mar 2015, 03:37 AM
Yeah, I remember this being a white hot pain on iOS. Looking forward to an easier way to do this...
Tags
NativeScript Insiders
Asked by
TJ
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
tommy
Top achievements
Rank 1
Share this question
or