Neseek77 / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
1 stars 0 forks source link

UIBinder: Whitespace removed between empty elements in IE7 #379

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of gwt and gwt-incubator are you using?
2.1

What OS and browser are you using?
Windows Vista / IE7

Do you see this error in hosted mode, web mode, or both?
Web Mode (was not able to get hosted mode plugin to run in IE7)

(If possible, please include a test case that shows the problem)

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui'>
  <g:HTMLPanel>
    <span ui:field="span1"/>
    <span ui:field="span2"/>

    <span ui:field="span3"> </span>
    <span ui:field="span4"> </span>

    <span ui:field="span5">placeholder</span>
    <span ui:field="span6">placeholder</span>

    <span>seven</span>
    <span>eight</span>
  </g:HTMLPanel>
</ui:UiBinder>

span1.setInnerText("one");
span2.setInnerText("two");
span3.setInnerText("three");
span4.setInnerText("four");
span5.setInnerText("five");
span6.setInnerText("six");

Hopefully using the test case you have generously provided, what steps will 
reproduce the problem?
1. Use the above template to create a Widget and set the span text
2. Compare the results in IE7 vs other browsers

What is the expected output? What do you see instead?

Expected (Chrome/Firefox/IE8): one two three four five six seven eight
Actual (IE7): onetwothreefourfive six seven eight

Workaround if you have one:
Programmatically insert an extra whitespace character into the DOM:

Text whitespace = Document.get().createTextNode(" ");
mySpan.getParentElement.insertAfter(whitespace, myspace);

OR put in some placeholder text instead of using a self-closing tag: <span 
ui:field="span1">&nbsp;</span>

Please provide any additional information below,  and thank you for taking the 
time and effort to report this issue, as good issue reports are critical for 
our quest to make GWT's new widgets and libraries shine.

Original issue reported on code.google.com by dhaw...@google.com on 1 Dec 2010 at 5:29