I'm having some issues with line breaks. They work in the Hosted Browser as well as IE8, however the don't work in Firefox or Opera. For example, if the user enters code in a text area that has line breaks (they pressed enter at some point), these line breaks will only be displayed in IE. I'm wondering if I should just convert the text to HTML and replace the \n with <br>, however that wouldn't be as clean. Is this a GWT problem, or am I doing something wrong?
Here is some sample code that shows my problem. If you try anything with a carriage return, it will work in IE but not in FF or Opera. VerticalPanel mainPanel = new VerticalPanel(); final Label label = new Label(); final TextArea box = new TextArea(); mainPanel.add(label); mainPanel.add(box); Button switchView = new Button("Update Label"); switchView.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { label.setText(box.getText()); }}); mainPanel.add(switchView); RootPanel.get().add(mainPanel); For example, if you use the text: asdf asdf asdf in IE it will render correctly, however anywhere else will simply show: asdf asdf asdf Thanks for your help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---