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

autogrow leaves garbage in DOM after removing it #25

Open
JohannRosenberg opened this issue Oct 13, 2017 · 0 comments
Open

autogrow leaves garbage in DOM after removing it #25

JohannRosenberg opened this issue Oct 13, 2017 · 0 comments

Comments

@JohannRosenberg
Copy link

JohannRosenberg commented Oct 13, 2017

When I use the autogrow on a textarea, it appends the following to the DOM:

<div style="position: absolute; top: -10000px; left: -10000px; width: 427.109px; font-size: 14.832px; font-family: system-ui; font-weight: 300; line-height: normal; resize: none; word-wrap: break-word;">...</div>

When I remove the textarea from the DOM, the above div still remains in the DOM. This continues to accumulate each time I add a textarea and remove it. You should change the following line:

$self.change(update).keyup(update).keydown({event:'keydown'},update);

to be this:

$self.change(update).keyup(update).keydown({event:'keydown'},update).on("remove", function(){
                shadow.remove();
            });
@JohannRosenberg JohannRosenberg changed the title autogrow leave garbage in DOM after removing it autogrow leaves garbage in DOM after removing it Oct 13, 2017
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

No branches or pull requests

1 participant