1. #1
    Ext User
    Join Date
    May 2007
    Posts
    57
    Vote Rating
    0
    splintor is on a distinguished road

      0  

    Question [1.1][CLOSED] Menu shadow is not updated when its content is changed while visible

    [1.1][CLOSED] Menu shadow is not updated when its content is changed while visible


    Hi,
    I have a sub-menu which initially displays "Loading, please wait...", and when displayed, sends an Ajax request and when the request returns, it updates the sub-menu content with a list of items, by calling something like:
    Code:
    menu.removeAll();
    menu.add("a", "b", "c");
    The update works well, but if it is all done while the sub-menu is visible, the shadow of the sub-menu remains in the size of the initial "Loading, please wait..." menu content, and is not updated to the new menu content. Hiding and re-showing the menu by moving the mouse solve the problem and displays a properly sized shadow.

    Is this a known problem? I couldn't find any reference to it.
    What can be done to handle this?

    Regards,
    splintor

  2. #2
    Ext User
    Join Date
    May 2007
    Posts
    57
    Vote Rating
    0
    splintor is on a distinguished road

      0  

    Thumbs up


    I just noticed I had a type in my search term. Searching again for "menu shadow" found me this link, where Jack recommends to use menu.el.sync(); when changing the menu while it is visible, and indeed, it works like a charm.

    So I guess it is not a bug, but it would be nice if it was mentioned somewhere in the Menu documentation.