diff options
author | Tatu Lund <tatu@vaadin.com> | 2021-04-19 10:52:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 10:52:08 +0300 |
commit | ae15672ae60977376d237b6d5ae41c74d296f1b9 (patch) | |
tree | a724c3882eed91302cfce1363bcc84163cd6dfca /client | |
parent | 222f9bba7d837a1b42190e554d0572f000131732 (diff) | |
download | vaadin-framework-ae15672ae60977376d237b6d5ae41c74d296f1b9.tar.gz vaadin-framework-ae15672ae60977376d237b6d5ae41c74d296f1b9.zip |
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 <anna@vaadin.com>
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VTextArea.java | 4 |
1 files changed, 3 insertions, 1 deletions
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"); |