Side navigation
#14771 closed bug (duplicate)
Opened February 07, 2014 02:30PM UTC
Closed February 24, 2014 03:21PM UTC
jQuery.closest('form') doesn't work for input-elements with name="nodeType"
Reported by: | s.schmidt@vision-cloud.de | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If there is any <input name="nodeType"/> in the DOM, the closest("form") and parents("form") methods doesn't work, i.e. the parent form-element is not found.
Try here:
If you change the name="nodeType" attribute to any other value, then it works.
Attachments (0)
Change History (3)
Changed February 07, 2014 02:41PM UTC by comment:1
Changed February 08, 2014 02:40AM UTC by comment:2
A similar previous case: http://bugs.jquery.com/ticket/12318
Following that logic, this should be marked invalid, although it's a really nasty corner case.
http://kangax.github.io/domlint/
If there's an easy workaround we can fix it, but I suspect the problem will just crop up somewhere else. Not sure if we can access
nodeType
when it's been clobbered by a form element name.