8
I have a form in my app, and I would like that after filling, if the person pressed Ir
or Done
, the keyboard would disappear.
Has anyone ever been there? Or knows how to solve?
8
I have a form in my app, and I would like that after filling, if the person pressed Ir
or Done
, the keyboard would disappear.
Has anyone ever been there? Or knows how to solve?
2
The best way to interact with the keyboard is using the plugin Ionic-plugin-Keyboard.
One of its methods is Cordova.plugins.Keyboard.close() that allows you to close the keyboard.
1
I believe that with the idea of @Eduardocalixto works, but you need to test, of course. But the logic is as follows:
ng-keydown="expression"
, ng-keypress="expression"
, ng-keyup="expression"
I believe that the keypress fits better, being that the value expression
will be the function declared in your current $Scope to the element in question.Remembering that you need to have the plugin https://github.com/driftyco/ionic-plugin-keyboard installed for the above method to work. Good luck!.
Browser other questions tagged angularjs apache-cordova keyboard
You are not signed in. Login or sign up in order to post.
Can’t get the input focus? I believe this will close the keyboard.
– Oeslei
@Oeslei am actually a native Ios developer, and the q project I’m working on is angular with Cordova.(I’ve never used it before) I’ll try to figure out how to do it, if it works out. Thank you
– Bruno Laise
The idea would be to make a button that simply removes the keyboard on the page, and when done successfully, embed that code in the buttons
Ir
andDone
.– mutlei