Opened 10 years ago
Closed 10 years ago
#12633 closed bug (notabug)
jquery .remove() does not remove these validation handlers
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have found a little conflict, a problem that is either caused by jquery or livevalidation:
Livevalidation "hangs on" to elements that have been removed by jquery.
See a minimal test case here:
https://gist.github.com/3803865
The use case is a form I am making that can expand to register more participants. When I remove one from the form, the form cannot be submitted. I have worked around the problem by looping over the to-be-removed input elements and call destroy() on them from Livevalidation.
Cheers
Jörgen
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Seems pretty clear that the plugin is caching the element:
this.element = element.nodeName ? element : document.getElementById(element)
So it's no wonder the element stays around once jQuery removes it from the document. This isn't a jQuery bug.
I have sent info on this in the feedback form on livevalidation.com too.