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
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

BB10 - bbUI.js 0.9.3 - Button Overflow not working first time

Hi,

 

I created an action-bar menu on the buttom with one "tab" styled element and some other "button" styled element, some of them are set to be part of the overflow menu for buttons. Right now it seems to not working for me if the app is loaded first time, I need to click a button styled element to push another screen and after I come back to this screen the overflow menu for buttons works well.

 

<div data-bb-type="action-bar">
	<div data-bb-type="action" data-bb-style="tab" data-bb-selected="true" data-bb-img="images/actionBar/cog_dark_theme.png">Home</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test1.html', 'test1');">test1</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test2.html', 'test2');">test2</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test3.html', 'test3');">test3</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test4.html', 'test4');">test4</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test5.html', 'test5');">test5</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test6.html', 'test6');">test6</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="bb.pushScreen('test7.html', 'test7');">test7</div>
	<div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-pin="true" data-bb-img="images/actionBar/cog_dark_theme.png" onclick="blackberry.app.exit();">Exit</div>
</div>

 Somebody encountered the same issues with bbUI.js version 0.9.3??

 

Regards


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - bbUI.js 0.9.3 - Button Overflow not working first time

Is this action bar included in its own *.htm page that is pushed onto the display stack?  Or is it part of the initial landing page defined in config.xml.  If you look at the samples/index.htm file, you'll notice that it first calls bb.init() and then does a bb.pushscreen(page, title) call immediately after.  Recommend setting up your app in a similar way?

 

I noticed the samples page seems to be doing something very similar to what you are trying:

https://github.com/blackberry/bbUI.js/blob/master/samples/actionBar.htm

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 - bbUI.js 0.9.3 - Button Overflow not working first time

Hi.

 

Thx for your response Adam. I also have an index.html defined in my config.xml and it immediately does a bb.pushscreen("myContent.html", "myContent"); with the shown actionBar from my source example. So I do not know what the issue is.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 - bbUI.js 0.9.3 - Button Overflow not working first time

Is anything helpful displayed in the console (Web Inspector)?

 

Another idea is to confirm that the button / tab elements have event handlers assigned to them.  This can also be done from the elements panel in Web Inspector.  If there are no active handlers when the page is first displayed, it sounds like a bug (perhaps they are being assigned at the wrong time), and I'd recommend filing an issue here:

https://github.com/blackberry/bbUI.js/issues?state=open

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.