Skip to main content

Bug Tracker

Side navigation

#12633 closed bug (notabug)

Opened September 29, 2012 12:41PM UTC

Closed September 29, 2012 01:47PM UTC

jquery .remove() does not remove these validation handlers

Reported by: jorgen@webworks.se 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

Attachments (0)
Change History (2)

Changed September 29, 2012 12:46PM UTC by jorgen@webworks.se comment:1

I have sent info on this in the feedback form on livevalidation.com too.

Changed September 29, 2012 01:47PM UTC by dmethvin comment:2

resolution: → notabug
status: newclosed

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.