Welcome!

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

Reply
Developer
Posts: 71
Registered: ‎02-06-2013
My Device: 9900
My Carrier: Rogers
Accepted Solution

Show/Hide Keyboard in BB10

How do I hide/show the onscreen keyboard using javascript?

I need to hide the keyboard before I push/pop screens, otherwise there are graphical errors.

Developer
Posts: 172
Registered: ‎05-01-2010
My Device: Z10
My Carrier: O2

Re: Show/Hide Keyboard in BB10

Any luck yet? Would love to use it as well Smiley Happy



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Developer
Posts: 23
Registered: ‎01-05-2013
My Device: 9800
My Carrier: IDEA

Re: Show/Hide Keyboard in BB10

hello,

you can get application level event's about keyboard status

https://developer.blackberry.com/html5/api/blackberry.app.html#.event:keyboardOpened

Developer
Posts: 71
Registered: ‎02-06-2013
My Device: 9900
My Carrier: Rogers

Re: Show/Hide Keyboard in BB10

Thanks. Unfortunately, that doesn't seem to allow me to control the keyboard.

Just for an outline of the problem: my app displays perfectly fine when the keyboard is brought up on appropriate screens. But if the keyboard is swiped up using the gesture, and then a new screen is pushed, the new screen becomes distorted due to the keyboard being displayed.
BlackBerry Development Advisor
Posts: 766
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Show/Hide Keyboard in BB10

Just a guess, but I assume the keyboard is shown because the user is typing in a text box, or some sort of input field.

 

If you do a 'blur' event on that input field, I would assume the keyboard should go away.  I haven't tried this, but it may be a work-around.

Developer
Posts: 172
Registered: ‎05-01-2010
My Device: Z10
My Carrier: O2

Re: Show/Hide Keyboard in BB10

I tried a dummy onblur(); event and its not working, but I dont hav any buttons as well. Only the search bar Smiley Happy



----------------------------------------------------------
find my widgets -> http://blackberry.itbert.de
Highlighted
Developer
Posts: 71
Registered: ‎02-06-2013
My Device: 9900
My Carrier: Rogers

Re: Show/Hide Keyboard in BB10

I'm actually trying to tackle the situation where the user swipes the keyboard onto the screen using the bezel shortcut. In this case, there's no way to close the keyboard before transitioning screens.