Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.postload.js

Issue 6332642748268544: Issue 1857 - Fixed issue where overlays were covered by elements with same z-index (Closed)
Patch Set: Created Jan. 23, 2015, 2:43 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -270,15 +270,15 @@
position = "fixed";
// Determine the effective z-index, which is the highest z-index used
- // by the element and its offset ancestors. When using a lower z-index
- // the element would cover the overlay. When using a higher z-index the
- // overlay might also cover other elements.
+ // by the element and its offset ancestors, and increase it by one.
+ // When using a lower z-index the element would cover the overlay.
+ // When using a higher z-index the overlay might also cover other elements.
if (style.position != "static" && style.zIndex != "auto")
{
- if (zIndex == "auto")
- zIndex = style.zIndex;
- else
- zIndex = Math.max(zIndex, style.zIndex);
+ var curZIndex = parseInt(style.zIndex, 10) + 1;
+
kzar 2015/01/26 17:30:41 Lol, whoops sorry! Missed that
+ if (zIndex == "auto" || curZIndex > zIndex)
+ zIndex = curZIndex;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld