1

I've tried almost every option discussed here on SE, but no matter what blockUI is blocking page UNDER the Bootstrap modal. I've checked and z-index of modal is 10050 so my code is like that:

$(document).ajaxStart(function(){
App.blockUI({
boxed: !0,
baseZ:20000,
message: "Wait a sec..."
})
});

It works OK when AJAX is requested on default page. But when I'm running AJAX query inside the modal, whole blockUI is displayed below. I've checked it and z-index is apparently somewhere around 1000. This seems to be obvious reason for hiding under the modal but why? Why "baseZ: 20000" is ignored?

Best regards Konrad

Anghor
  • 83
  • 1
  • 10
  • Hi, welcome to SO. With this information we can't help that much with your issue. Show us your code in a way we can replicate it and understand exactly what you're trying to accomplish. Thanks. – Cthulhu Mar 07 '16 at 15:14
  • Hi, Thanks for reply. Don't know how to show more of the code as this is rather large project and code has some bits and pieces all over the project :( – Anghor Mar 07 '16 at 15:24
  • Try building a small algorithm with just the necessary code to replicate your problem. How about creating a fiddle? https://jsfiddle.net/ Sometimes you might actually find the solution yourself while simplifying your code. – Cthulhu Mar 07 '16 at 15:32
  • OK.. I just realized that this is Metronic theme and they override plugins behavior. I've found correct spot and change it there... Not the cleanest solution but it works. Should I delete the Question then - what is a good rule of thumb here? – Anghor Mar 07 '16 at 15:47
  • If you think someone else might have the same problem, you can post an answer yourself. If you believe it's something specific to your project and probably won't be useful to anyone, you can delete your post. Cheers on finding the solution! – Cthulhu Mar 07 '16 at 15:58

1 Answers1

2

This issue appears to be Metronic Theme issue.

If you're using their App.js there is an slight change how blockUI is interpreted. You no longer pass z-index for block ui as:

$.blockUI({ baseZ: 20000, });

They redefined this property so blockUI is expeting:

$.blockUI({ zIndex: 20000, });

This of course is more intuitive, but it's not described in any Metronic docs, and against blockUI docs.

Anghor
  • 83
  • 1
  • 10