Bug 1069597 - Make overlay and dialog views exclusively visible.

I don't think there is way to do that automatically no. It is possible to do this purely in CSS, but the dialog needs to precede the covered view in the markup, so we could use the "~" selector. The z-index of the dialog would need to be higher too.