From: Artur Signell Date: Thu, 12 Feb 2009 10:54:38 +0000 (+0000) Subject: Fix for #2573 - Added fixed default width for RichTextArea X-Git-Tag: 6.7.0.beta1~3169 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1902b4a17762a29337805ad399e0f654a81dc224;p=vaadin-framework.git Fix for #2573 - Added fixed default width for RichTextArea svn changeset:6816/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/richtextarea/IRichTextArea.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/richtextarea/IRichTextArea.java index dab5fd9dd5..09142b4082 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/richtextarea/IRichTextArea.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/richtextarea/IRichTextArea.java @@ -58,6 +58,8 @@ public class IRichTextArea extends Composite implements Paintable, Field, private int maxLength = -1; + private int toolbarNaturalWidth = 500; + public IRichTextArea() { fp.add(formatter); @@ -210,13 +212,17 @@ public class IRichTextArea extends Composite implements Paintable, Field, } super.setWidth(w + "px"); - } else if (width.equals("") && BrowserInfo.get().isIE()) { + } else if (width.equals("")) { /* * IE cannot calculate the width of the 100% iframe correctly if - * there is no width specified for the parent so we use the width of - * the toolbar. + * there is no width specified for the parent. In this case we would + * use the toolbar but IE cannot calculate the width of that one + * correctly either in all cases. So we end up using a default width + * for a RichTextArea with no width definition in all browsers (for + * compatibility). */ - super.setWidth(formatter.getOffsetWidth() + "px"); + + super.setWidth(toolbarNaturalWidth + "px"); } else { super.setWidth(width); }