-
Notifications
You must be signed in to change notification settings - Fork 64
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
Raise events for grow and shrink actions #11
Conversation
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! |
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? |
@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 :) |
@zedtux - Sorry, but the PR has been here for 2 years, I don't think it's getting merged :( |
Thank you @michael-martin for your message. Anyway I had to use another plugin as this one is not playing well with a |
@zedtux - Ah awesome, what was the other library? |
Cool, thanks for sharing, will check it out! |
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. |
@ultimatedelman - Sorry, slow response again here! Updated to resolve the merge issues now, thanks :) |
Raise events for grow and shrink actions
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!