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

Raise events for grow and shrink actions #11

Merged
merged 4 commits into from
Mar 8, 2016

Conversation

michael-martin
Copy link
Contributor

This change means that when autogrow grows/shrinks a textarea, it will then dispatch events to indicate this (Event won't fire until animation is complete, if the user has animation enabled). I've added some docs to the readme, but the code is pretty straightforward.

It means the user's app can keep track of what's going on and update as appropriate.

As an example, my app has a textarea at the bottom of the screen, and when the box grows, I want to auto-scroll the browser down so that the full box is still visible.

What do you think?

It would also solve this issue: #8

(Haven't updated the .min or json files btw)

PS - Thanks for making this plugin, it's been so useful!

@ultimatedelman
Copy link
Owner

i will take a closer look at this, but i like this idea. i am trying to keep the filesize down, though, so I'll see if I can do this a bit neater. thanks for this!

@michael-martin
Copy link
Contributor Author

Sure thing, makes total sense. I saw you had some very nifty syntax to keep things as short as possible, will be interested to see what you come up with! :)

I wonder if callbacks sets on opts would give an improvement? At least, it would mean the notifyGrown() and notifyShrunk() functions could be deleted, and the places that call them could call those callbacks directly?

@zedtux
Copy link

zedtux commented Dec 20, 2015

@michael-martin awesome ! I'm looking for that feature ! It looks like there are conflicts, can you please update your branch so that @ultimatedelman could merge it :)

@michael-martin
Copy link
Contributor Author

@zedtux - Sorry, but the PR has been here for 2 years, I don't think it's getting merged :(

@zedtux
Copy link

zedtux commented Dec 20, 2015

Thank you @michael-martin for your message. Anyway I had to use another plugin as this one is not playing well with a max-height on the textarea.
But thanks to you as I've inspired from your code in order to implement the event triggering in the other library.

@michael-martin
Copy link
Contributor Author

@zedtux - Ah awesome, what was the other library?

@zedtux
Copy link

zedtux commented Dec 20, 2015

@michael-martin
Copy link
Contributor Author

Cool, thanks for sharing, will check it out!

@ultimatedelman
Copy link
Owner

Hey guys, thanks for bringing this back up. I completely forgot about this pull request. Right now it's showing that the branch has conflicts. If they get resolved, I will merge.

@michael-martin
Copy link
Contributor Author

@ultimatedelman - Sorry, slow response again here! Updated to resolve the merge issues now, thanks :)

ultimatedelman added a commit that referenced this pull request Mar 8, 2016
Raise events for grow and shrink actions
@ultimatedelman ultimatedelman merged commit c64c32b into ultimatedelman:master Mar 8, 2016
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