Closed bttf closed 8 years ago
Hey, sorry for the delay responding here. Looks like this is causing a test failure with this kind of usage:
{{#content-editable}}
template block text
{{/content-editable}}
I guess it's because the change is setting the text to an empty string, and by what you've said it would have been a no-op before.
Closing this since it's been a while.
According to this jQuery bug https://bugs.jquery.com/ticket/13666 and also the docs for
.text()
http://api.jquery.com/text/#text2 , passing innull
orundefined
is not valid input for the.text()
method. This change avoids passing in either values.In the latest jQuery,
null
s andundefined
s are handled as regular no-ops, albeit they are undocumented (save for above links). But in past versions, the behavior is less predictable - in as recent as 1.11.3, passing innull
will return a string'null'
.Currently, we are embedding our ember app in a legacy web app, and are running into this minor complication. Refining the way we use
.text()
can help us in this situation and also help adhere more strictly to jQuery docs.