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

Posts: 60
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a
Accepted Solution

bbui text input focus

Does anyone have a sample of how to set the focus on a input text box while using the bbui.js framework? Everything I have tried so far doesn't work. Thanks in advance for your help.

Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: bbui text input focus

Which hardware are you testing this on (Smartphones or PlayBook)?  If it is for Smartphone, you may be able to use ocus-mode navigation and then use setFocus to target a specific input element.


What other options have you tried so far?

Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Posts: 60
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: bbui text input focus

I am testing this for smartphones. Here is a comment from Tim Neil in another thread which explains why it is happening.




<snipped from thread>

Re: Focus navigation mode too slow

You likely can't set the focus in the onscreenready event of bbUI.  This event fires when the screen has been loaded into memory so that you can manipulate it before it is inserted into the DOM.


I have an ondomready event that will be added and available in 2.5 weeks :smileyhappy:

Tim Neil
Director, Application Platform & Tools Product Management

</snipped from thread>

Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: bbui text input focus

I'm also waiting for this one Smiley Wink