Skip to content

v-pre doesn't work inside textarea? #3306

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

Closed
rjurado01 opened this issue Jul 21, 2016 · 3 comments
Closed

v-pre doesn't work inside textarea? #3306

rjurado01 opened this issue Jul 21, 2016 · 3 comments

Comments

@rjurado01
Copy link

rjurado01 commented Jul 21, 2016

Hello, I have this example: https://jsfiddle.net/rjurado/tq136Lwr/

<textarea id="textarea" v-pre>
  {{works}}
</textarea>

<div id="example">
  <p v-pre>{{ work }}</p>
  <textarea v-pre>{{ no wokrs }}</textarea>
</div>
new Vue({ el: '#textarea' });
new Vue({ el: '#example' });

Why second textarea show empty?
If you inspect it you can see this:

<textarea :value="no wokrs">{{ no wokrs }}</textarea>
@rjurado01 rjurado01 changed the title v-pro doesn't work inside textarea? v-pre doesn't work inside textarea Jul 21, 2016
@rjurado01 rjurado01 changed the title v-pre doesn't work inside textarea v-pre doesn't work inside textarea? Jul 21, 2016
@sirlancelot
Copy link

A temporary workaround would be to surround the textarea in a div with the v-pre directive.

https://jsfiddle.net/81cumjxp/1/

@LinusBorg LinusBorg added the bug label Jul 21, 2016
@rjurado01
Copy link
Author

@sirlancelot Thanks this work.

@hylin
Copy link

hylin commented Jul 26, 2016

duplicate of #3184 , allready fixed by #3202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants