Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the soft keyboard when you tap outside of textfields #6

Closed
tjvantoll opened this issue Aug 19, 2015 · 6 comments
Closed

Hide the soft keyboard when you tap outside of textfields #6

tjvantoll opened this issue Aug 19, 2015 · 6 comments

Comments

@tjvantoll
Copy link
Contributor

See https://groups.google.com/forum/#!topic/nativescript/PJ15jnNhs1A

@danicomas
Copy link

+1

@danicomas
Copy link

If you are inside tabs the google group solution doesn't work @tjvantoll

@danicomas
Copy link

Solved with tabs using the tab observe instead the page:

<TabView id="tabview">
   <TabView.items>
     <TabViewItem title="Form" iconSource="res://home">
       <TabViewItem.view>
         <StackLayout id="tab1">
        ...
...
var tab1 = view.getViewById(page, "tab1");
tab1.observe(gestures.GestureTypes.tap, function (args) {
   name.dismissSoftInput();
   email.dismissSoftInput();
}

@tjvantoll
Copy link
Contributor Author

Thanks for the tip @danicomas (and sorry it took me so long to respond). Groceries doesn't use tabs so the Google Group solution seems to work just fine.

@shibobrota
Copy link

Hi @danicomas,

I think this should happen automatically i.e when I focus out of a text field, the keyboard should hide automatically.

Any thoughts on this?

@alqabali
Copy link

up .. i believe that what said @shibobrota is correct .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants