Rendering mixed dynamic/static content getting squished


#1

Recently I noticed when templates render with a handlebar-evaluated variable next to static content, they get squished together as though there was no whitespace between them, even thought there in fact IS in the template.

Example image and code

The Chrome inspector shows the following inside the h1 tags:

"Bradley Schaefer" "Login Details"

(some) Dependency versions:

✗ ember -v
version: 0.1.11
node: 0.10.33
npm: 2.1.8

"ember": "1.8.1",                      
"ember-data": "1.0.0-beta.12",
"ember-resolver": "~0.1.11", 

Is this a browser bug? Is there some library version I should check/update? Is this expected behavior?

EDIT: totally unsure if this is the right forum - if SO or Github Issues is a better place, just let me know.


#2

An unsatisfying workaround is to put your handlebar helper on one line and your static text on another

{{person.fullName}}

Login Details

will have a space between them once the template is rendered.

{{person.fullName}} Login Details

Will inexplicably NOT have a space between the name and the text. Go figure.


#3

Yes, this is a browser bug. @mixonic tracked it down and reported it to the Chrome team a little while back. Sorry that I cannot recall the issue number though…


#4

This is indeed a Chrome bug.

We have a plan to mitigate the problem by using less blank text nodes (and more comment nodes), hopefully in 1.11 but maybe in 1.12.


#5

I appreciate the thorough response, and consider the issue closed on my end. Glad to hear that everyone is on top of it!