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
New Contributor
Posts: 5
Registered: ‎07-17-2012
My Device: Torch 9860, Bold 9900, Curve 9380, Curve 9360, Curve 8520, PlayBook
My Carrier: -
Accepted Solution

Keyboard closing issue

Hello,

sometimes when closing the virtual keyboard in a webworks application, the area of the keyboard turns blank and is not used by the app anymore. Afterwards no changes to the application are visible anymore, the screen stops redrawing until you open the keyboard again.

The error occured on BB Torch 9860 and Curve 9380. The OS Version is 7.0.

Here is some code to reproduce the error:


<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width,height=device-height,user-scalable=no,initial-scale=1.0,target-densitydpi=device-dpi">
        <meta name="expires" content="0">
        <title>Keyboard closing error</title>
        
    </head>
    <body style="width:100%; height: 100%; background-color: #ffffcc; overflow:hidden;">
        
        <input type="text" style="margin-top: 400px;"/>
        
    </body>
</html>


Apparently the error occurs more often if the code is more complex, in this example it doesnt occur often.

And here are some screenshots of what happens:

The app in its initial state: https://www.dropbox.com/s/lavo52bn6fw4uh6/01.jpg

After opening the keyboard: https://www.dropbox.com/s/e90zxt0quexur8m/02.jpg

After closing the keyboard: https://www.dropbox.com/s/92zu2o70fgyi4k4/03.jpg

On the third screenshot you can see the blank area on the bottom of the screen.

Is there any possibility to prevent this error?

Any help would be appreciated, thank you in advance!

Sincerely Yours,

Andreas Kasch

BlackBerry Development Advisor
Posts: 36
Registered: ‎01-26-2012
My Device: 9900
My Carrier: T-Mobile DE

Re: Keyboard closing issue

[ Edited ]


can you control when the keyboard is hidden? If so, can you try a small content change to force a repaint?


Highlighted
New Contributor
Posts: 5
Registered: ‎07-17-2012
My Device: Torch 9860, Bold 9900, Curve 9380, Curve 9360, Curve 8520, PlayBook
My Carrier: -

Re: Keyboard closing issue

i can click on buttons etc. but i dont see any changes, as if the screen is not redrawn. (from the server communication i know pressing buttons still work). the only chance to make it work again is to press on an input field, so the keyboard pops up again. i also tried to force a repaint by adding or removing content and triggering a resize event, but it changes nothing.

BlackBerry Development Advisor
Posts: 36
Registered: ‎01-26-2012
My Device: 9900
My Carrier: T-Mobile DE

Re: Keyboard closing issue

We have a blackberry.ui.screen extension in Github that you could try to use.  This allows you to manually hide the virtual keyboard.  I’m not sure if it produces a difference in behavior, but might be worth trying it.

 

In case it is an OS bug, have you tried newer 7.0 and 7.1 versions?

Check here for availability: http://us.blackberry.com/support/apps-and-software/desktop-and-device-download-sites.html

 

 

New Contributor
Posts: 5
Registered: ‎07-17-2012
My Device: Torch 9860, Bold 9900, Curve 9380, Curve 9360, Curve 8520, PlayBook
My Carrier: -

Re: Keyboard closing issue

I tried that extension, but it shows the same behavior.

 

i tried to get a software update with the desktop software, but it doesnt show me any updates. i also dont have a service provider. is there any other way to get a software update?

BlackBerry Development Advisor
Posts: 36
Registered: ‎01-26-2012
My Device: 9900
My Carrier: T-Mobile DE

Re: Keyboard closing issue

you can load any of the builds available through that page. You don't need to stick to your own carrier. The only one issue is that you will have a carrier specific branding on your BlackBerry but this is not relevant for the problem here. I would propose to check for a newer Build in your region and go ahead and load it and re-test. You can always go back to your original build afterwords.

 

 

New Contributor
Posts: 5
Registered: ‎07-17-2012
My Device: Torch 9860, Bold 9900, Curve 9380, Curve 9360, Curve 8520, PlayBook
My Carrier: -

Re: Keyboard closing issue

i updated the OS to 7.1 now, but the bug is still there...

New Contributor
Posts: 5
Registered: ‎07-17-2012
My Device: Torch 9860, Bold 9900, Curve 9380, Curve 9360, Curve 8520, PlayBook
My Carrier: -

Re: Keyboard closing issue

I just found a solution to this issue myself:

 

With JS:

window.onresize = function(){
    window.scrollTo(0,0);
}

 


Or with jQuery:

$(window).resize(function(){
    $(window).scrollTop(0);
});

 

 

i think this is just a workaround and the issue should be fixed in the API anyway.

BlackBerry Development Advisor
Posts: 36
Registered: ‎01-26-2012
My Device: 9900
My Carrier: T-Mobile DE

Re: Keyboard closing issue

Thank you very much for sharing this with the BB community. I'll make sure your feedback is reaching the right person internally.