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

Fixed IE issue #417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed IE issue #417

wants to merge 1 commit into from

Conversation

mikeangstadt
Copy link

@mikeangstadt mikeangstadt commented Nov 30, 2016

Fixes an IE 'Invalid Argument' exception with textareas:
Error happens, because (for whatever reason) IE temporarily converts <textarea placeholder="foo"></textarea> to <textarea placeholder="foo">foo</textarea>. This triggers a diff patch on the 'foo' innerHTML as a VTEXT node, but by the time vdom tries to set the VTEXT's value, it has been orphaned by IE.

IE throws an error whenever you try to set the nodeValue of a parentless node which exposes itself as an 'Invalid Argument' exception.

Error happens, because (for whatever reason) IE temporarily converts <textarea placeholder="foo"></textarea> to <textarea placeholder="foo">foo</textarea>. This triggers a diff patch on the 'foo' innerHTML as a VTEXT node, but by the time vdom tries to set the VTEXT's value, it has been orphaned by IE.

IE throws an error whenever you try to set the nodeValue of a parentless node which exposes itself as an 'Invalid Argument' exception.
@coveralls
Copy link

coveralls commented Nov 30, 2016

Coverage Status

Coverage remained the same at 97.531% when pulling 8aadfcb on mikeangstadt:master into 947ecf9 on Matt-Esch:master.

@panthershark
Copy link

Try always putting a value in the 3rd arg. Ex:

const attrs = { 
  "placeholder": 'dogs' 
};

h('textarea', attrs, '');

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.

3 participants