Bug Tracker

Opened 10 years ago

Last modified 9 years ago

#5091 closed bug

Attribute type of "multiple" in chrome/safari/firefox — at Version 1

Reported by: assertfail Owned by:
Priority: blocker Milestone: 1.5
Component: attributes Version: 1.5
Keywords: Cc: miketaylr
Blocked by: Blocking:

Description (last modified by dmethvin)

For instance if you have an input with id "someid" with a custom attribute "multiple" that has the value "True", then the following evaluates to true: (typeof $("#someid").attr("istrue"))==="boolean" in chrome.

Change History (2)

Changed 10 years ago by assertfail

Attachment: chrome.htm added

A file that helps demonstrating the inconsistancy

comment:1 Changed 9 years ago by dmethvin

Component: unfiledattributes
Description: modified (diff)
Summary: Attribute type inconsistency in chromeAttribute type of "multiple" in chrome/safari/firefox

Repro in Firefox 3.6, Chrome 5 and Safari 5, but not IE 8. jQuery is not causing this, it's present in the native DOM. I think what is happening is that since multiple is a boolean property of the select element, there is some common DOM code in the browser that is processing this attribute for input elements as well.

It's always a very good idea to avoid any names that are used by DOM elements, see http://yura.thinkweb2.com/domlint/ for some examples.

I'll leave this open for the moment but I'm not sure there's anything jQuery can/should do about it.

Note: See TracTickets for help on using tickets.