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

Textareas not having prefilled values when using weld to serve HTML from node.js & jsdom #41

Merged
merged 1 commit into from Dec 24, 2011
Merged

Textareas not having prefilled values when using weld to serve HTML from node.js & jsdom #41

merged 1 commit into from Dec 24, 2011

Conversation

jhillacre
Copy link
Contributor

When serving textarea elements from node.js using weld and jsdom, I was getting the value as an attribute on the textarea instead of as text content. This attribute is ignored by browsers getting served html from node.js.

This commit changed handling of textarea to use .textContent instead of .value. Opera ignores the child text nodes resulting from using .textContent while the textarea isn't in the document tree. To work around this, .value is still used for Opera.

…changed handling of textarea to use textContent. However, Opera ignores child text nodes when inserting textarea elements back into the document, so we have to still use value for Opera...
heapwolf pushed a commit that referenced this pull request Dec 24, 2011
Textareas not having prefilled values when using weld to serve HTML from node.js & jsdom
@heapwolf heapwolf merged commit a87419e into tmpvar:master Dec 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants