Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Glimmer 2] textarea renders "true" instead of "" #14001

Closed
2 tasks done
GavinJoyce opened this issue Aug 2, 2016 · 3 comments · Fixed by glimmerjs/glimmer-vm#250
Closed
2 tasks done

[Glimmer 2] textarea renders "true" instead of "" #14001

GavinJoyce opened this issue Aug 2, 2016 · 3 comments · Fixed by glimmerjs/glimmer-vm#250

Comments

@GavinJoyce
Copy link
Member

GavinJoyce commented Aug 2, 2016

The rendered value of textarea is "true" instead of "" when the context value is "".

TODO:

Given the following controller:

export default Ember.Controller.extend({
  textareaContent1: '',
  textareaContent2: 'some default text',
});

And template:

textareaContent1: {{textarea value=textareaContent1}} <br />
textareaContent2: {{textarea value=textareaContent2}} <br />

htmlbars renders:

screen shot 2016-08-02 at 12 01 05

glimmer renders:

screen shot 2016-08-02 at 12 00 36

Sample App: https://github.com/GavinJoyce/glammer (see http://localhost:4200/issue3)

This doesn't happen for {{input}}.

@GavinJoyce
Copy link
Member Author

GavinJoyce commented Aug 2, 2016

We're calling normalizePropertyValue for value on textarea which converts a "" value to true:

https://github.com/tildeio/glimmer/blob/9ecc9ade7efa41cf7068729ddeea4b09c1ce51de/packages/glimmer-runtime/lib/dom/props.ts#L33-L39

screen shot 2016-08-02 at 17 37 29

Should this use normaliseTextValue like INPUT?

@rwjblue
Copy link
Member

rwjblue commented Aug 3, 2016

Reopening here until we bump glimmer versions.

@cibernox
Copy link
Contributor

This is the only bit preventing EPS from work in glimmer2. I've even reduced the reproduction even more: https://ember-twiddle.com/64618480b3b1507f8d73475007f9b2a0?openFiles=templates.application.hbs%2C

webark pushed a commit to webark/ember.js that referenced this issue Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants