I'm using the GXT 2 desktop app with GXT 2 windows with GXT 3 widgets inside. I have a strange problem when context menus, dropdown lists and other "popup items" are in question. Namely, what happens is that the popup item itself appears behind the GXT 2 window so I can't see it.

I tried setting the initial z-index of the GXT 2 window to something lower and then the popup items show normally. However, whenever I open another GXT 2 window on the desktop, and then switch back to the previous one the z-index changes and the window again appears in front of the popping items.

Specifically I have this problem with a grid context menu, and a date selector within a menu button, and also a comboBox within a menu button.

My current workaround is to manually reset the z-index when opening popup items like so:

Code:
predefinedMenu.addShowHandler(new ShowHandler() {
            @Override
            public void onShow(ShowEvent event) {
                predefinedMenu.getElement().setZIndex(99999);
            }
        });
However, this really isn't an elegant solution for me and it adds extra work on complex layouts.

Any suggestions on how to fix this behavior? Thanks!