Won't fix .xenOverlay has z-index more than .Menu

grisha2217

Active member
Affected version
1.5.19
I want to show Menu in overlay, but overlay overlaps menu, because .xenOverlay has z-index more than .Menu (9999 vs 5000)
 
Mini fix, put this to member_card or create your js file:

JavaScript:
<script>
$(document).one('OverlayOpening', function(){
    $('.xenOverlay').find('.Popup').data('XenForo.PopupMenu').$menu.css('z-index', 11111);
});
</script>
 
Unfortunately, you may need to continue with your workaround here.

If we were to implement your workaround globally then menus would always be visible through overlays - even menus that aren't inside overlays.

There are improvements and approaches in XF 2.1 which make this work better so I can only recommend you move to that for a more permanent solution.
 
Unfortunately, you may need to continue with your workaround here.

If we were to implement your workaround globally then menus would always be visible through overlays - even menus that aren't inside overlays.

There are improvements and approaches in XF 2.1 which make this work better so I can only recommend you move to that for a more permanent solution.
I improved my solution, this good works and i don't have problems for 2 months, but i think this is bad productive code.

JavaScript:
$(document).one('OverlayOpening', function(){
    
        var $overlay = $('.xenOverlay:not(.Checked)');
        var $data = $overlay.find('.Popup').data('XenForo.PopupMenu');
        if ($data) {
            $data.$menu.css('z-index', 11111);
        }   
        
        $overlay.addClass('Checked');
    });
 
Top Bottom