Hello,
I'm using SmartGWT 3.1p-2013-03-14 and I'm having problems with RichTextEditor in Chrome 27.
When the RichText is displayed the user can only enter text as if the control were a TextItem.
When pressing enter the Control gains height.
To understand better I'm enclosing a sreenshot.
Here's some code to reproduce the problema:
I'm using SmartGWT 3.1p-2013-03-14 and I'm having problems with RichTextEditor in Chrome 27.
When the RichText is displayed the user can only enter text as if the control were a TextItem.
When pressing enter the Control gains height.
To understand better I'm enclosing a sreenshot.
Here's some code to reproduce the problema:
Code:
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.RichTextEditor;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.VLayout;
public class ProblemaChromeRichText implements EntryPoint {
@Override
public void onModuleLoad() {
VLayout layout = new VLayout();
layout.setMembersMargin(5);
final Canvas htmlCanvas = new Canvas();
htmlCanvas.setHeight(800);
htmlCanvas.setWidth(900);
htmlCanvas.setPadding(2);
htmlCanvas.setOverflow(Overflow.HIDDEN);
htmlCanvas.setCanDragResize(true);
htmlCanvas.setShowEdges(true);
htmlCanvas.setContents("Click <b>Set Canvas HTML</b> to display edited content.");
final RichTextEditor richTextEditor = new RichTextEditor();
richTextEditor.setHeight(155);
richTextEditor.setWidth(900);
richTextEditor.setOverflow(Overflow.HIDDEN);
richTextEditor.setCanDragResize(true);
richTextEditor.setShowEdges(true);
// Standard control group options include
// "fontControls", "formatControls", "styleControls" and "colorControls"
//richTextEditor.setControlGroups(new String[]{"fontControls", "styleControls"});
layout.addMember(richTextEditor);
IButton button = new IButton("Set Canvas HTML");
button.setWidth(150);
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
htmlCanvas.setContents(richTextEditor.getValue());
}
});
layout.addMember(button);
layout.addMember(htmlCanvas);
layout.draw();
}
}
Comment