Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#12221 closed bug (cantfix)

form is not being hidden when it have an input with name attr value set as "style"

Reported by: [email protected] Owned by:
Priority: low Milestone: None
Component: effects Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


Using this:


The code above works for this:

    <input id="foo" name="bar"/>

But not works for this:

    <input id="foo" name="style"/>

Change History (6)

comment:1 Changed 10 years ago by David Buzatto <[email protected]…>

Here is a jsFiddle with some tests: http://jsfiddle.net/davidbuzatto/7P2AL/

comment:2 Changed 10 years ago by anonymous

this is spawned by http://stackoverflow.com/questions/11864899/hiding-form-tag-in-jquery

the behaviour can be reproduced by setting either id or name to "style"

comment:3 Changed 10 years ago by timmywil

Component: unfiledeffects
Priority: undecidedlow
Status: newopen

I'm inclined to say wontfix here. Let's see what the core team thinks.

comment:4 Changed 10 years ago by gnarf

Resolution: cantfix
Status: openclosed

I'm pretty sure this is a "cantfix" not a "wontfix" - it is eerily similar to #1414 which rick and I spent a lot of time trying to find a nice way around... Either way, this is a DOM Lint issue http://kangax.github.com/domlint/ test #1

Names of form controls are populated as properties of "parent" form element and might conflict with "actual" properties of a form element (either own or inherited via "interface chain") Interfaces tested against are HTMLFormElement, HTMLElement, Element, Node, EventTarget, ElementCSSInlineStyle as well as Object.prototype

Last edited 10 years ago by gnarf (previous) (diff)

comment:5 Changed 10 years ago by dmethvin

Yeah I agree, sometimes we can work around these but I don't think so in this case--especially in IE6/7. Also it's not a jQuery-specific issue and there's no obvious place that the jQuery docs can mention this. Web devs just have to know that some words cannot be used as form names. Sucks.

comment:6 Changed 9 years ago by dmethvin

#15120 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.