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
Contributor
Posts: 13
Registered: ‎12-21-2011
My Device: Developer
My Carrier: Developer

focus-based navigation

I've read the page of this topic https://bdsc.webapps.blackberry.com/html5/documentation/ww_developing/using_the_navigation_mode_1866...

 

My HTML is like this:

 

<div id="content1">
			<div class="class1" x-blackberry-focusable="true" onclick="viewc2();">
				...
			</div>
		</div>
		<div id="content2">
			<div class="class2" x-blackberry-focusable="true" onclick="viewc1();">
				...
			</div>
		</div>

 

I use jQuery hide and show methods to show content1 or content2. The problem is every time I use those methods, the focus is lost and I'm not able to navigate the content. Both methods work as expected and if I use a touch device or a non-focus-based navigation also works, this just happened in focus-based navigation. How does x-blackberry-focusable works or is a king of bug?

Highlighted
Contributor
Posts: 13
Registered: ‎12-21-2011
My Device: Developer
My Carrier: Developer

Re: focus-based navigation

I used blackberry.focus.setFocus to set the focus in another element in the content1 section. This shouldn't be neccesary because the x-blackberry-focusable elementa are already defined.