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
songdawg
Posts: 59
Registered: ‎06-08-2011
My Device: 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.

Please use plain text.
Retired
astanley
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.
Please use plain text.
Developer
songdawg
Posts: 59
Registered: ‎06-08-2011
My Device: 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.

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Focus-navigation-mode-too-slow/m...

 

<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>

Please use plain text.
Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha

Re: bbui text input focus

I'm also waiting for this one :smileywink:

Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.