From ae15672ae60977376d237b6d5ae41c74d296f1b9 Mon Sep 17 00:00:00 2001 From: Tatu Lund Date: Mon, 19 Apr 2021 10:52:08 +0300 Subject: Add browser specific handling in setRows (#12141) * Add browser specific handling in setRows Fixes: https://github.com/vaadin/framework/issues/10138 Fixes: https://github.com/vaadin/framework/issues/7878 * Enforced minimum height to 1 rows and added a test. Co-authored-by: Anna Koskinen --- client/src/main/java/com/vaadin/client/ui/VTextArea.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/src/main/java') diff --git a/client/src/main/java/com/vaadin/client/ui/VTextArea.java b/client/src/main/java/com/vaadin/client/ui/VTextArea.java index 769b1ed817..b50bd88a04 100644 --- a/client/src/main/java/com/vaadin/client/ui/VTextArea.java +++ b/client/src/main/java/com/vaadin/client/ui/VTextArea.java @@ -60,6 +60,7 @@ public class VTextArea extends VTextField implements DragImageModifier { super(DOM.createTextArea()); setStyleName(CLASSNAME); addKeyDownHandler(enterDownHandler); + getElement().getStyle().setOverflowX(Overflow.HIDDEN); } public TextAreaElement getTextAreaElement() { @@ -76,7 +77,8 @@ public class VTextArea extends VTextField implements DragImageModifier { } if (wordWrap) { getElement().removeAttribute("wrap"); - getElement().getStyle().clearOverflow(); + getElement().getStyle().clearOverflowY(); + getElement().getStyle().setOverflowX(Overflow.HIDDEN); getElement().getStyle().clearWhiteSpace(); } else { getElement().setAttribute("wrap", "off"); -- cgit v1.2.3