From 468438fc0ff41c299e2e015f569f96fbd5e09411 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 14 Mar 2013 16:31:06 +0200 Subject: Reattach when wrapping in webkit for correct text flow (#10536) Change-Id: I431b6a3c61a9308ad4189e5d79a5e70de8f1f560 --- client/src/com/vaadin/client/ui/VTextArea.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/src') 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; -- cgit v1.2.3