1

It appears that when a component is loaded/rendered using knockout.js, white space is generated.

I don't see it anywhere in my code for components but they are visible when I inspect elements. saying

"&#65279"

If I delete it the white space disappears.

Is it a known issue to knockout.js? Or if it's not, where should I start from to solve this issue?

Example code would like look like this

<componentA>
"$#65279"
    component contents ... 
</componentA>
<componentB>
""$#65279"
    <link ... ... .. ..
    ... actual c
</componentB>

as seen here, everytime component is loaded the blank space is generated.

This is only visible through F12 on browsers when I inspect the code I can't find it anywhere in the actual code file that's been written. I tried searching through code by copying the white space generated by the Unicode, but no luck.

It seems like its generated by knockout's component rendering part. Which part of knockout should I be looking into?

Thanks

Evan Park
  • 528
  • 1
  • 6
  • 20

1 Answers1

1

Found out what's causing the issue. BOM marker in front of every component template is generating white space with 20px height and 100% width for every component.

This is being generated when template file is being read as utf-8 through fs.readFileSync().

It can be removed by doing substring(1) (I think it's too hackish to solve the issue). I'm still waiting for appropriate solution to this problem.

Open to any suggestion.

Thanks

Evan Park
  • 528
  • 1
  • 6
  • 20