summaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-03-14 16:31:06 +0200
committerVaadin Code Review <review@vaadin.com>2013-03-14 14:39:31 +0000
commit468438fc0ff41c299e2e015f569f96fbd5e09411 (patch)
treec1ebd905e9a22f61bf5d29ea718678b57adab2bd /client/src
parent12228618971e94fee1264a2e5018a1d24be64137 (diff)
downloadvaadin-framework-468438fc0ff41c299e2e015f569f96fbd5e09411.tar.gz
vaadin-framework-468438fc0ff41c299e2e015f569f96fbd5e09411.zip
Reattach when wrapping in webkit for correct text flow (#10536)
Change-Id: I431b6a3c61a9308ad4189e5d79a5e70de8f1f560
Diffstat (limited to 'client/src')
-rw-r--r--client/src/com/vaadin/client/ui/VTextArea.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VTextArea.java b/client/src/com/vaadin/client/ui/VTextArea.java
index 139cd87ca4..4a5de23828 100644
--- a/client/src/com/vaadin/client/ui/VTextArea.java
+++ b/client/src/com/vaadin/client/ui/VTextArea.java
@@ -161,9 +161,12 @@ public class VTextArea extends VTextField {
getElement().getStyle().setOverflow(Overflow.AUTO);
getElement().getStyle().setWhiteSpace(WhiteSpace.PRE);
}
- if (BrowserInfo.get().isOpera()) {
+ if (BrowserInfo.get().isOpera()
+ || (BrowserInfo.get().isWebkit() && wordwrap)) {
// Opera fails to dynamically update the wrap attribute so we detach
// and reattach the whole TextArea.
+ // Webkit fails to properly reflow the text when enabling wrapping,
+ // same workaround
Util.detachAttach(getElement());
}
this.wordwrap = wordwrap;