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

Unified Diff: include.postload.js

Issue 4605237906112512: Issue 1607 - Create overlays with corresponding z-index (Closed)
Patch Set: Created Nov. 25, 2014, 5:53 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
@@ -210,10 +210,16 @@
var overlay = document.createElement('div');
overlay.prisoner = elt;
overlay.className = "__adblockplus__overlay";
- overlay.setAttribute('style', 'opacity:0.4; background-color:#ffffff; display:inline-box; ' + 'width:' + thisStyle.width + '; height:' + thisStyle.height + '; position:absolute; overflow:hidden; -webkit-box-sizing:border-box; z-index: 99999');
+ overlay.setAttribute('style', 'opacity:0.4; background-color:#ffffff; display:inline-box; ' + 'width:' + thisStyle.width + '; height:' + thisStyle.height + '; position:absolute; overflow:hidden; -webkit-box-sizing:border-box;');
var pos = getAbsolutePosition(elt);
overlay.style.left = pos[0] + "px";
overlay.style.top = pos[1] + "px";
+
+ if (thisStyle.position != "static")
+ overlay.style.zIndex = thisStyle.zIndex;
+ else
+ overlay.style.zIndex = getComputedStyle(elt.offsetParent).zIndex;
kzar 2014/11/26 09:10:04 We should probably check that elt.offsetParent isn
Sebastian Noack 2014/11/26 09:32:46 That is already done with http://codereview.adbloc
kzar 2014/11/26 10:53:30 Whoops, gotya!
+
// elt.parentNode.appendChild(overlay, elt);
document.body.appendChild(overlay);
return overlay;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld