Say I have 3 spans wrapped in a div.
<div>
<span>1/1/2000</span>
<span>-</span>
<span>1/2/2000</span>
</div>
Browsers are supposed to interpret the newlines between the spans as whitespace so that the resultant display looks like this:
1/1/2000 - 1/2/2000
... not like any of these
1/1/2000-1/2/2000
1/1/2000- 1/2/2000
1/1/2000 -1/2/2000
... and this is the case with IE8 when the spans have no knockout bindings. If you were to inspect the above markup using IE8 Developer tools, you can clearly see "Text - Empty Text Node" after each span.
<div>
<span>1/1/2000</span>
Text - Empty Text Node
<span>-</span>
Text - Empty Text Node
<span>1/2/2000</span>
Text - Empty Text Node
</div>
However, as soon as I put knockout binding on the spans like so, the empty text node behavior changes:
<div>
<span data-bind="text: start"></span>
<span data-bind="visible: end">-</span>
Text - Empty Text Node
<span data-bind="text: end"></span>
Text - Empty Text Node
</div>
... the empty text node between the first 2 spans looks like it's getting stripped. Is this a knockout bug? Any workaround? This is using version 2.3.0.