mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix incorrect render order in Firefox for position: static an z-index value
This commit is contained in:
parent
edebe082f3
commit
c287f51cb6
@ -97,6 +97,8 @@ export default class NodeContainer {
|
|||||||
|
|
||||||
const IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
const IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
||||||
|
|
||||||
|
const position = parsePosition(style.position);
|
||||||
|
|
||||||
this.style = {
|
this.style = {
|
||||||
background: IS_INPUT ? INPUT_BACKGROUND : parseBackground(style, imageLoader),
|
background: IS_INPUT ? INPUT_BACKGROUND : parseBackground(style, imageLoader),
|
||||||
border: IS_INPUT ? INPUT_BORDERS : parseBorder(style),
|
border: IS_INPUT ? INPUT_BORDERS : parseBorder(style),
|
||||||
@ -114,13 +116,13 @@ export default class NodeContainer {
|
|||||||
opacity: parseFloat(style.opacity),
|
opacity: parseFloat(style.opacity),
|
||||||
overflow: parseOverflow(style.overflow),
|
overflow: parseOverflow(style.overflow),
|
||||||
padding: parsePadding(style),
|
padding: parsePadding(style),
|
||||||
position: parsePosition(style.position),
|
position: position,
|
||||||
textDecoration: parseTextDecoration(style),
|
textDecoration: parseTextDecoration(style),
|
||||||
textShadow: parseTextShadow(style.textShadow),
|
textShadow: parseTextShadow(style.textShadow),
|
||||||
textTransform: parseTextTransform(style.textTransform),
|
textTransform: parseTextTransform(style.textTransform),
|
||||||
transform: parseTransform(style),
|
transform: parseTransform(style),
|
||||||
visibility: parseVisibility(style.visibility),
|
visibility: parseVisibility(style.visibility),
|
||||||
zIndex: parseZIndex(style.zIndex)
|
zIndex: position !== POSITION.STATIC ? parseZIndex(style.zIndex) : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.isTransformed()) {
|
if (this.isTransformed()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user