diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTextArea.java | 3 |
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 |