From 14b77ea84f784e372c6b913c489584ce0b2d4ae2 Mon Sep 17 00:00:00 2001 From: Vladimir Siljkovic Date: Tue, 11 Dec 2018 00:10:33 +0100 Subject: [PATCH] Fix: `autozindex` to set z-index if highest z-index on page was 0 Autozindex might still not work correctly if some element on the page is using the maximum z-index (probably 2147483647). --- jquery.popupoverlay.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.popupoverlay.js b/jquery.popupoverlay.js index c70b57f..e8128e0 100644 --- a/jquery.popupoverlay.js +++ b/jquery.popupoverlay.js @@ -286,7 +286,7 @@ // Add z-index to the background if (options.background) { - if (zindexvalues[el.id] > 0) { + if (zindexvalues[el.id] >= 0) { $('#' + el.id + '_background').css({ zIndex: (zindexvalues[el.id] + 1) }); @@ -294,7 +294,7 @@ } // Add z-index to the wrapper - if (zindexvalues[el.id] > 0) { + if (zindexvalues[el.id] >= 0) { $wrapper.css({ zIndex: (zindexvalues[el.id] + 2) });