Skip to content

textarea placeholder is set into textarea value (IE11) #558

New issue

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

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

Already on GitHub? # to your account

Closed
jsedlacek opened this issue Nov 12, 2014 · 3 comments
Closed

textarea placeholder is set into textarea value (IE11) #558

jsedlacek opened this issue Nov 12, 2014 · 3 comments
Labels

Comments

@jsedlacek
Copy link

There is a weird behavior of textarea in Vue 0.11 and IE10/IE11.
Textarea's value is taken out of placeholder attribute.

var vm = new Vue({
  data: function() {
    return {value: ''}
  },
  template: '<textarea v-model="value" placeholder="aaa"></textarea>'
});
vm.$mount();
vm.$appendTo(document.body);
assert.equal(vm.value, '');

This results in:

AssertionError: expected 'aaa' to equal ''

All other browsers work fine.

@jsedlacek
Copy link
Author

FYI it works correctly in Vue 0.10.6

@yyx990803
Copy link
Member

This is actually a bug in IE10/11: when a <textarea> with placeholder attribute is cloned, the clone's value is set to the original's placeholder. I implemented a workaround in Vue's template parser to deal with this.

@jsedlacek
Copy link
Author

Awesome, thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants