Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel
Accepted Solution

tracking keypad open /close events

hello all, Is there any way to suspend the keypad after pressing submit button on keypad . pressing on submit button indirectly means that user is done with the keypad, but keypad is not getting suspended. without suspending keypad, there are redraw issues on pages where iscroll is implemented. Are there any events which i can add them to listen during device ready of cordova functions through which i can suspend the keypad forcefully under specific cases other than submit case as described above. please let me know.

- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: tracking keypad open /close events

There are no APIs to open and close the keyboard.


If you are using a <form> with <input> inside, the submit button should (and does) close the keyboard.

<form id="submitForm" action="#">
    <input name="q" type="text"/>
    <input style="display:none" type="submit" title="Search">

Try the code above and let me know how it behaves for you, also, provide the OS build you are testing this on.





I've used the following implementation (mobile YouTube uses this too):


If you need to close the keyboard, on submit, just remove the DOM node that has the <input> field. This forces the keyboard to close. You can quickly save the data, remove the node, append the node back to DOM and fill with the data. This should be pretty transparent to the user.