Skip to main content

Bug Tracker

Side navigation

#12221 closed bug (cantfix)

Opened August 08, 2012 04:06PM UTC

Closed August 16, 2012 06:41PM UTC

Last modified May 30, 2014 01:37PM UTC

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

Reported by: davidbuzatto@gmail.com Owned by:
Priority: low Milestone: None
Component: effects Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

Using this:

$(function(){
   $("form").hide();
});

The code above works for this:

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

But not works for this:

<form>
    <input id="foo" name="style"/>
</form>
Attachments (0)
Change History (6)

Changed August 08, 2012 04:13PM UTC by David Buzatto <davidbuzatto@gmail.com> comment:1

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

Changed August 09, 2012 08:02AM UTC by anonymous comment:2

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"

Changed August 09, 2012 03:22PM UTC by timmywil comment:3

component: unfiledeffects
priority: undecidedlow
status: newopen

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

Changed August 16, 2012 06:41PM UTC by gnarf comment:4

_comment0: 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 \ \ }}} \ 1345142538922054
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

Changed August 16, 2012 06:58PM UTC by dmethvin comment:5

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.

Changed May 30, 2014 01:37PM UTC by dmethvin comment:6

#15120 is a duplicate of this ticket.