Skip to content

Commit

Permalink
Set overflow hidden for input elements
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed Aug 11, 2017
1 parent fb58d1f commit ad487f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/NodeContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ type StyleDeclaration = {
zIndex: zIndex
};

const INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];

export default class NodeContainer {
name: ?string;
parent: ?NodeContainer;
Expand Down Expand Up @@ -114,7 +116,10 @@ export default class NodeContainer {
font: parseFont(style),
letterSpacing: parseLetterSpacing(style.letterSpacing),
opacity: parseFloat(style.opacity),
overflow: parseOverflow(style.overflow),
overflow:
INPUT_TAGS.indexOf(node.tagName) === -1
? parseOverflow(style.overflow)
: OVERFLOW.HIDDEN,
padding: parsePadding(style),
position: position,
textDecoration: parseTextDecoration(style),
Expand Down

0 comments on commit ad487f4

Please sign in to comment.