Last node on bbui screen not being added to scroll area in BB10 #561

de1st opened this Issue Jan 2, 2013 · 5 comments


None yet

2 participants


If html for a screen does not have white space as it's last node, important content is not added to scrollArea in BB10.

I am using backbone views to generate the html for bbui screens (with the exception of the screen div itself and scripts to import javascript files). However, I encountered several problems including, title bar covering content, scroll problems (action bar scrolling vertically), input boxes not activating etc.
I discovered that my content was not being added to the scrollArea by bbui, because the loop in bb.screen.apply that adds content from the tempHolder array to scrollArea, leaves out the last node. Manually entered html would usually have a text node (whitespace) as the last node because it is formatted to be easily human readable. My last node is my content!

The picture below shows where in bbui I think the problem is.

bbui prob

You can reproduced the problem by removing the whitespace at the bottom of the Input Controls screen in the bbui demo, from the last textarea div onward.

I have currently altered my backbone views to add an empty text node as the last node to get things to work.

Open Source Projects member

Logged this as a bug and I'll take a look at it

Open Source Projects member

The loop is doing a childNodes.length -1 because childNodes is a zero based indexed array and j is starting at 0. If I remove the -1 then there will be exceptions thrown.

What seems to be happening is that without whitespace the last child node is not recognized. Really odd.


Are you changing the two loops? No change is needed for the loop where I have the green arrow, that one is fine. As far as I can tell, it ensures that the outerScrollArea is not added to the scrollArea since the scrollArea in already added to the outerScrollArea.

Try changing only the one with the orange arrow. That is the one I changed and got it to work on both ripple and the simulator.

As exists, the loops leave out whatever is last because they do length -1 with < instead of <=.

Open Source Projects member

Ahhh.. I see.. let me make the change

@tneil tneil pushed a commit that referenced this issue Jan 8, 2013
Tim Neil fix for issue #561 db88183
Open Source Projects member

This is now fixed.. It was also occurring in the scroll panels for PlayBook/BB10

@tneil tneil closed this Jan 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment