summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-03-12 18:44:16 +0200
committerVaadin Code Review <review@vaadin.com>2013-03-13 07:10:28 +0000
commit0d75be99df6075f86ceb48ef4e430411cf47a854 (patch)
treecc72078541c6e47f3e1fb9bc8e36173f40e07514 /client
parent6b49a6dce955537ea093db85ebc50d070690820b (diff)
downloadvaadin-framework-0d75be99df6075f86ceb48ef4e430411cf47a854.tar.gz
vaadin-framework-0d75be99df6075f86ceb48ef4e430411cf47a854.zip
Ensure nonwrapping textarea has white-space: pre; style (#10536)
Change-Id: Iaac6b58d204082374827cb7b6caef5f5f81e3dbc
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VTextArea.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VTextArea.java b/client/src/com/vaadin/client/ui/VTextArea.java
index 6e93a076d9..139cd87ca4 100644
--- a/client/src/com/vaadin/client/ui/VTextArea.java
+++ b/client/src/com/vaadin/client/ui/VTextArea.java
@@ -18,6 +18,7 @@ package com.vaadin.client.ui;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.dom.client.Style.Overflow;
+import com.google.gwt.dom.client.Style.WhiteSpace;
import com.google.gwt.dom.client.TextAreaElement;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
@@ -154,9 +155,11 @@ public class VTextArea extends VTextField {
if (wordwrap) {
getElement().removeAttribute("wrap");
getElement().getStyle().clearOverflow();
+ getElement().getStyle().clearWhiteSpace();
} else {
getElement().setAttribute("wrap", "off");
getElement().getStyle().setOverflow(Overflow.AUTO);
+ getElement().getStyle().setWhiteSpace(WhiteSpace.PRE);
}
if (BrowserInfo.get().isOpera()) {
// Opera fails to dynamically update the wrap attribute so we detach