PDA

View Full Version : [1.1][CLOSED] Menu shadow is not updated when its content is changed while visible



splintor
9 Oct 2007, 2:35 AM
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:


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

splintor
9 Oct 2007, 12:53 PM
I just noticed I had a type in my search term. Searching again for "menu shadow" (http://www.google.com/custom?cx=011693920879787039234%3Az7of1ufqccu&q=menu+shadow&sa=Search&cof=AH%3Aleft%3BALC%3A%23000099%3BBGC%3A%23FFFFFF%3BCX%3AExt%2520Forum%2520Search%3BDIV%3A%23336699%3BFORID%3A0%3BGALT%3A%23008000%3BGFNT%3A%23777777%3BGIMP%3A%23777777%3BL%3Ahttp%3A%2F%2Fgoogle.com%2Fcoop%2Fimages%2Fgoogle_custom_search_sm.gif%3BLC%3A%23000099%3BLH%3A55%3BLP%3A1%3BT%3A%23333333%3BVLC%3A%236633CC%3B&adkw=AELymgXHfjikU1ZyAEdaUaOJcFBLjgJyntjr_8TiqopnUHeWXWJzv0MadADWee-cyBP7dtTwMsb4eCC1cITvGEfa3GpMSCayGjI1wrGwdiZESq9BRyMTZdav0aHAafK2nxz8TGVjTIPc&hl=en&client=google-coop-np) found me this link, (http://extjs.com/forum/showthread.php?t=8098) 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.