Results 1 to 3 of 3

Thread: .show()/.hide() on a toolbar doesn't work properly

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    2

    Default .show()/.hide() on a toolbar doesn't work properly

    Sencha Touch version tested:
    • 1.1.0




    Platform tested against:
    • Google Chrome dev 13.0.772.0
    • BlackBerry TabletOS 1.0.3.1868 running on a BlackBerry PlayBook


    Description:
    • 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:
      • Code:
        if (panelHidden) 
          app.viewport.dockedItems.items[0].show();
        else
          app.viewport.dockedItems.items[0].hide();
        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:
    • None


    Possible fix:
    • Not provided

  2. #2
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159

    Default

    Did you fix this? I just tested it on Chrome and it works as expected.

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    2

    Default

    Yeah, already fixed it. Turns out I had to add this code:
    Code:
                          app.viewport.dockedItems.items[0].rendered = false;
                          app.viewport.doComponentLayout();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •