mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Set overflow hidden for input elements
This commit is contained in:
parent
fb58d1f0b6
commit
ad487f4585
@ -72,6 +72,8 @@ type StyleDeclaration = {
|
|||||||
zIndex: zIndex
|
zIndex: zIndex
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
|
||||||
|
|
||||||
export default class NodeContainer {
|
export default class NodeContainer {
|
||||||
name: ?string;
|
name: ?string;
|
||||||
parent: ?NodeContainer;
|
parent: ?NodeContainer;
|
||||||
@ -114,7 +116,10 @@ export default class NodeContainer {
|
|||||||
font: parseFont(style),
|
font: parseFont(style),
|
||||||
letterSpacing: parseLetterSpacing(style.letterSpacing),
|
letterSpacing: parseLetterSpacing(style.letterSpacing),
|
||||||
opacity: parseFloat(style.opacity),
|
opacity: parseFloat(style.opacity),
|
||||||
overflow: parseOverflow(style.overflow),
|
overflow:
|
||||||
|
INPUT_TAGS.indexOf(node.tagName) === -1
|
||||||
|
? parseOverflow(style.overflow)
|
||||||
|
: OVERFLOW.HIDDEN,
|
||||||
padding: parsePadding(style),
|
padding: parsePadding(style),
|
||||||
position: position,
|
position: position,
|
||||||
textDecoration: parseTextDecoration(style),
|
textDecoration: parseTextDecoration(style),
|
||||||
|
Loading…
Reference in New Issue
Block a user