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

Textarea has no val! #11

Open
elo80ka opened this issue Feb 27, 2014 · 3 comments
Open

Textarea has no val! #11

elo80ka opened this issue Feb 27, 2014 · 3 comments

Comments

@elo80ka
Copy link
Owner

elo80ka commented Feb 27, 2014

From dirley...@gmail.com on July 18, 2010 00:20:35

Having a formset with a textarea, and having this textarea a value, when a new row is inserted, it'll copy the textarea value.

It's simple to solve:

if (elem.is('input:checkbox') || elem.is('input:radio')) {
elem.attr('checked', false);
}
else if (elem.is('textarea')) {
elem.html('');
}
else {
elem.val('');
}

Original issue: http://code.google.com/p/django-dynamic-formset/issues/detail?id=11

@elo80ka elo80ka self-assigned this Feb 27, 2014
@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From stan.madueke on July 17, 2010 23:57:11

That's odd...I can't reproduce your issue, and a quick test in Firebug shows .val('') to be working just fine in jQuery 1.3.2. What browser are you using? What version of jQuery? It seems the behavior of .val varies slightly between versions, for certain elements.

@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From jmaya...@gmail.com on December 17, 2011 09:20:47

I had the same issue using the latest version of chrome. and jquery.1-6-2. The problem can be solved as dirley explained

@elo80ka
Copy link
Owner Author

elo80ka commented Feb 27, 2014

From stan.madueke on December 17, 2011 13:46:54

Status: Accepted
Owner: stan.madueke

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

1 participant