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
tricciardi
Posts: 5
Registered: ‎04-11-2011
My Device: BlackBerry Z10

WebWorks 2.0 SDK Back Button Exiting App on OS 6 after Text Input Focus

Installed the new 2.0 SDK today and the blackberry.system.event.KEY_BACK button that we are trapping for is now exiting the application in the following situation.

 

-- Set focus to a input text control, balckberry.focus.setFocus(id);

-- Set focus again to allow for typing. document.getElementById(id).focus();

-- Hit back button and you exit text edit mode.

-- Hit back button again and you exit the app.  We are trapping code here to perform a show on a div. This worked properly in sdk 1.5.

 

 

New Contributor
tricciardi
Posts: 5
Registered: ‎04-11-2011
My Device: BlackBerry Z10

Re: WebWorks 2.0 SDK Back Button Exiting App on OS 6 after Text Input Focus

We were able to work around the problem by calling .blur() on the input element before showing the hidden div.

 

The main issue we have on OS 6 for text input boxes is that to allow the user to begin typing we have to make 2 focus calls. 

 

First we call the BlackBerry api .SetFocus() and then we have to call the dom element focus() method.  When we do this, the user has to click on the back button twice if the text box has focus.  Once to leave text input focus and then a second time to fire the back button event.