Bug Tracker

Modify

Ticket #12318 (closed bug: invalid)

Opened 9 months ago

Last modified 9 months ago

Input element with id="nodeType" causes trouble in event-callbacks

Reported by: klaascuvelier <cuvelierklaas@…> Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

Description

If you have an input element with id="nodeType" within a form, there are problems selecting the elements of that form from within the submit callback (and in other events).

Working testcase:  http://jsfiddle.net/klaascuvelier/ySth9/11/

I suppose the 'nodeType' attribute of html-elements can be the cause of this problem.

Tested in OSX, browers: Firefox 14.0.1 Google Chrome 23.0 Google Chrome 21.0 Safari 6.0

This bug is also reproducable in earlier jQuery versions, on jsFiddle I tried with versions: 1.8.0, 1.7.2, 1.6.4, 1.5.2, 1.4.4, 1.3.2

Easy workaround is just changing the ID of the element.

Change History

comment:1 Changed 9 months ago by rwaldron

  • Status changed from new to closed
  • Resolution set to invalid

nodeType is a special cased property name used by the DOM, the best resolution here is to not use "nodeType" in your own code, unless you're using it to access the nodeType of a DOM node. As you noted, the fix is to change the id

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.