Skip to content

Commit

Permalink
Fix: autozindex to set z-index if highest z-index on page was 0
Browse files Browse the repository at this point in the history
Autozindex might still not work correctly if some element on the page is using the maximum z-index (probably 2147483647).
  • Loading branch information
vladimirsiljkovic committed Dec 10, 2018
1 parent 67f3792 commit 14b77ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jquery.popupoverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@

// 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)
});
}
}

// Add z-index to the wrapper
if (zindexvalues[el.id] > 0) {
if (zindexvalues[el.id] >= 0) {
$wrapper.css({
zIndex: (zindexvalues[el.id] + 2)
});
Expand Down

0 comments on commit 14b77ea

Please sign in to comment.