Is there a way to change the magento2 modal ( & modal overlay ) z-index, using their built in modal widget?
I've read all their docs and I couldn't find a nice way of doing it. But I do really need to increase the z-index...
I would rather change z-index for specific modals, but a global override of all modal widget z-index's would be OK too.
Here is the relevant part of my code ('zIndex' doesn't do anything)
Any ideas..?
var options = {
type: 'popup',
clickableOverlay: true,
zIndex: 9995
};
var modalPopup = modal(options, $('#modal_id'));
$('#modal_el').click(function() { modalPopup.openModal() });
Cheers! :)
Fixed using css!
Set a custom class on the modal and set the z-index on this
var options = {
...
modalClass: 'hi_z_index'
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With