View Full Version : .show()/.hide() on a toolbar doesn't work properly

31 May 2011, 8:40 AM
Sencha Touch version tested:



Platform tested against:

Google Chrome dev 13.0.772.0
BlackBerry TabletOS running on a BlackBerry PlayBook


When I use .show() or .hide() on a toolbar, the toolbar doesn't (dis)appear unless the browser is resized or device's orientation is changed.

Test Case:

See this URL : http://popoffka.ru/map/index.html

Steps to reproduce the problem:

Load the page
Press the button in the bottom-left corner

Here's the code that this button executes:

if (panelHidden)
panelHidden = !panelHidden;

Press the button once again

The result that was expected:

A toolbar appears in the page's top
A toolbar disappears after the second press

The result that occurs instead:

Nothing seems to be happening after the first press, however, if you resize the browser or change the device's orientation, the toolbar will finally appear
After the first press, if the toolbar was visible, it becomes invisible, however, it doesn't disappear, i.e., the space that was occupied by it becomes white instead of hosting other elements (as if the element was assigned "visibility: hidden" instead of "display: none"). However, after you resize the browser or change the device's orientation, everything becomes OK.

Screenshot or Video:

None, but I'll provide them if they're required

Debugging already done:


Possible fix:

Not provided

3 Jun 2011, 2:51 PM
Did you fix this? I just tested it on Chrome and it works as expected.

3 Jun 2011, 9:43 PM
Yeah, already fixed it. Turns out I had to add this code:

app.viewport.dockedItems.items[0].rendered = false;