mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix z-index stacking with fixed position
This commit is contained in:
parent
24d9a22556
commit
b1f948bb60
2
dist/html2canvas.js
vendored
2
dist/html2canvas.js
vendored
@ -2047,7 +2047,7 @@ function renderableNode(node) {
|
|||||||
|
|
||||||
function isPositionedForStacking(container) {
|
function isPositionedForStacking(container) {
|
||||||
var position = container.css("position");
|
var position = container.css("position");
|
||||||
var zIndex = (position === "absolute" || position === "relative") ? container.css("zIndex") : "auto";
|
var zIndex = (["absolute", "relative", "fixed"].indexOf(position) !== -1) ? container.css("zIndex") : "auto";
|
||||||
return zIndex !== "auto";
|
return zIndex !== "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
dist/html2canvas.min.js
vendored
2
dist/html2canvas.min.js
vendored
File diff suppressed because one or more lines are too long
@ -617,7 +617,7 @@ function renderableNode(node) {
|
|||||||
|
|
||||||
function isPositionedForStacking(container) {
|
function isPositionedForStacking(container) {
|
||||||
var position = container.css("position");
|
var position = container.css("position");
|
||||||
var zIndex = (position === "absolute" || position === "relative") ? container.css("zIndex") : "auto";
|
var zIndex = (["absolute", "relative", "fixed"].indexOf(position) !== -1) ? container.css("zIndex") : "auto";
|
||||||
return zIndex !== "auto";
|
return zIndex !== "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25
tests/cases/zindex/z-index17.html
Normal file
25
tests/cases/zindex/z-index17.html
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head lang="en">
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>z-index17</title>
|
||||||
|
<style>
|
||||||
|
.z {
|
||||||
|
background: darkolivegreen;
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100px;
|
||||||
|
z-index: 10;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: violet;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript" src="../../test.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="z">fixed z-index 10</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user