Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Does not resize on initial page load #1

Open
PhillippOhlandt opened this issue Jun 1, 2016 · 9 comments · May be fixed by #6
Open

Does not resize on initial page load #1

PhillippOhlandt opened this issue Jun 1, 2016 · 9 comments · May be fixed by #6

Comments

@PhillippOhlandt
Copy link

Hey,

I use it like this:

<textarea name="content" v-model="content" v-autosize="content" class="Article__Edit__Textarea" debounce="500"></textarea>

The content variable is a property on the component. When I load the site, the textarea has its original height until I change something in the text. Is this a bug or intended?

@tthallos
Copy link
Owner

tthallos commented Jun 7, 2016

@PhillippOhlandt Can you give a reproduction link ? because I have no problem with your code.

@PhillippOhlandt
Copy link
Author

Hey, sorry for the late reply. Here is a webpackbin:
http://www.webpackbin.com/VJpQCmA4b

@koronowicz
Copy link

+1

@tthallos
Copy link
Owner

@PhillippOhlandt
The problem may be caused by different versions.
The vue version is 1.0.18 in your webpackin. In this version, I find the bind method of the directive has not complie the DOM value, I get the {{msg}} when i get el.value.
I have no good idea to fix it, but you can use [email protected], it works well.

@PhillippOhlandt
Copy link
Author

@mage3k Thanks for the explanation. I use vue 1.0.22 in my project and get the same behaviour.

@tanigami
Copy link

+1

morr added a commit to morr/vue-autosize that referenced this issue May 6, 2017
@morr morr linked a pull request May 6, 2017 that will close this issue
@xiangcatherine
Copy link

+1 Having the same issue

@sandrooco
Copy link

@morr's implementation fixes that, simply use his version!
https://github.com/morr/vue-autosize/blob/1b2d9fca72110139073416b84ea48ec7473dc8fb/index.js

@warent
Copy link

warent commented Dec 16, 2017

Hi @mage3k I've created a new PR for this fix (Basically just copied @morr's code) with no merge conflicts. Please check in at your earliest convenience

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

Successfully merging a pull request may close this issue.

7 participants