I have a YUI dialog with z-index set to 1000. Then there is a little ul/li based (not a select) dropdown on the parent page which has a z-index 100. This (always) works perfect on my dev box - the dropdown goes behind the dialog.
But on a staging site, I get a strange behavior where the dropdown peeps through the dialog. When I check the dialog z-index using firebug, it is set to 4! The dropdown z-index is still 100. This happens only for particular cases.
I was wondering what might be causing to change the z-index of the dialog to 4 when my code sets it to 1000.
Since the problem is only happening for "particular cases," it sounds like a bug in your sw rather than in yui.
Carefully check your css in the "particular cases" to make sure that your css file is not over-riding the z-index value. (Your css should not set the zindex value if it is being set programmatically by YUI dialog.)
Check your code where you create the dialog to ensure that your z-index setting has been set for each instantiation of the dialog. It could be that the z-index is being reset when the dialog is hidden.