simulacra icon indicating copy to clipboard operation
simulacra copied to clipboard

IE11 table bindObject render error

Open edwardsayer opened this issue 5 years ago • 3 comments

I just create a simple test for binding json array with html table rows. It works as expected in other browsers but not in IE. please check the jsfiddle for detail. Thanks!

edwardsayer avatar Oct 07 '18 13:10 edwardsayer

Is there any error stack trace that you can show me? My guess is that you are using a <template> tag which isn't even supported in IE. You can work around this by using a <div> or anything other than <template> instead.

I don't have access to a VM with IE11 at the moment. As far as I know, it should be working in Edge.

gr0uch avatar Oct 10 '18 06:10 gr0uch

@daliwali It's not all about template tag, i can use div style='display:none' as template tag to work around this. You can check the new jsfiddle for example. The major issue with IE11 is it shift output cell in the second row. img

for example, the following template:

  <div id="temp" style="display: none">
    <table>
      <tr>
        <td>name</td>
        <td>age</td>
      </tr>
      <tr class="rows">
        <td><span class="name">name</span></td>
        <td><span class="age">name</span></td>
      </tr>
    </table>
  </div>

In IE11, the rendered result is:

<table>
  <tbody>
    <tr>
      <td>name</td>
      <td>age</td>
    </tr>
    <tr class="rows">
      <td><span class="name">boy</span></td>
      <td><span class="age">17</span><span class="age">18</span></td>
    </tr>
    <tr class="rows">
      <td></td><span class="name">girl</span>
      <td></td>
    </tr>
  </tbody>
</table>

While in other browser, the correct result is rendered:

<table>
  <tbody>
    <tr>
      <td>name</td>
      <td>age</td>
    </tr>
    <tr class="rows">
      <td><span class="name">boy</span></td>
      <td><span class="age">17</span></td>
    </tr>
    <tr class="rows">
      <td><span class="name">girl</span></td>
      <td><span class="age">18</span></td>
    </tr>
  </tbody>
</table>

I really like simulacra and wish to use it in my client projects. but due to IE11 is STILL widely used in enterprise enviroments...

edwardsayer avatar Oct 11 '18 02:10 edwardsayer

Hmm, that is extremely odd behavior. I'll try to investigate it in more detail when I get access to IE11.

gr0uch avatar Oct 11 '18 02:10 gr0uch