Bug Tracker

Modify

Ticket #5091 (closed bug: wontfix)

Opened 4 years ago

Last modified 2 years ago

Attribute type of "multiple" in chrome/safari/firefox

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

Description (last modified by dmethvin) (diff)

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.

Attachments

chrome.htm Download (1.2 KB) - added by assertfail 4 years ago.
A file that helps demonstrating the inconsistancy

Change History

Changed 4 years ago by assertfail

A file that helps demonstrating the inconsistancy

comment:1 Changed 3 years ago by dmethvin

  • Component changed from unfiled to attributes
  • Description modified (diff)
  • Summary changed from Attribute type inconsistency in chrome to Attribute 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.

comment:2 Changed 3 years ago by rwaldron

  • Priority changed from minor to blocker
  • Status changed from new to open
  • Milestone changed from 1.4 to 1.4.5

Confirmed;

Expect: ["True", "string"], ["False", "string"]

IE:     ["True", "string"], ["False", "string"]
Opera:  ["True", "string"], ["False", "string"]

Chrome: [ true, "boolean"], ["False", "string"]
FF:     [ true, "boolean"], ["False", "string"]
Safari: [ true, "boolean"], ["False", "string"]

 http://jsfiddle.net/rwaldron/fjXFw/4/

Last edited 3 years ago by rwaldron (previous) (diff)

comment:3 Changed 3 years ago by rwaldron

  • Status changed from open to closed
  • Resolution set to wontfix

multiple="True" is not a valid attribute on input type="text", nor is true a valid value for this attribute.

comment:5 Changed 2 years ago by john

  • Version changed from 1.3.2 to 1.5

There wasn't a 1.4.5 release, was actually 1.5.

comment:6 Changed 2 years ago by john

  • Milestone changed from 1.4.5 to 1.5

There was no 1.4.5 release, was actually 1.5.

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.