Ionic Keyboard


Ionic Keyboard: Keyboard is very important feature in ionic. Ionic provides functionality which automatically identifies the field elements which needs a keyboard. The field elements should be in ionic’s scroll view or directive such as content.


Ionic Keyboard Example

Ionic keyboard functionality becomes very important when you want to customize the default behavior of the keyboard. Here we are going to explain this with an example-

How to use Ionic Keyboard?

Suppose you want to implement a functionality when keyboard is open such as hide an element when the keyboard is open. For this functionality you can use the class .hide-on-keyboard-open Here is an example –

Ionic Keyboard Example

<input type="text" name="email">
<div class="hide-on-keyboard-open">
 <h1>Hide Me on Keyboard Open</h1>
</div>

When click on the above input field email the keyboard will be open at the time of the keyboard open the element div with class .hide-on-keyboard-open will be hidden.

Note : The above functionality will work only in ionic’s scroll view or directive such as content.

You can find the plugin at https://github.com/driftyco/ionic-plugin-keyboard


Advertisements

Add Comment

📖 Read More