Opened 10 years ago

Closed 7 years ago

#9822 closed defect (wontfix)

dojo.attr(li, "value") returns number on IE7

Reported by: bill Owned by: Eugene Lazutkin
Priority: low Milestone: future
Component: HTML Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

Stemmed the dojo-interest mailing list, I noticed that for

<ul>
        <li value="home">Home</li>
        <li value="contact">Contact</li>
</ul>

On IE7 (only), dojo.attr(li, "value") returns 1 rather than "home".

The problem is apparently limited to <li> nodes.

node.getAttribute("value") works correctly, and returns "home".

Change History (8)

comment:1 Changed 10 years ago by James Burke

Owner: changed from sjmiles to Eugene Lazutkin

Passing this to elazutkin, seems like it fits in with his work on dojo.attr().

comment:2 Changed 10 years ago by Eugene Lazutkin

Milestone: tbd1.4
Status: newassigned

comment:3 Changed 10 years ago by Eugene Lazutkin

Priority: normalhigh

comment:4 Changed 10 years ago by Eugene Lazutkin

Yep, I was able to replicate the problem.

comment:5 Changed 10 years ago by Eugene Lazutkin

According to MS (http://msdn.microsoft.com/en-us/library/ms535124%28VS.85,loband%29.aspx) "value" should be an integer. It has a curious definition for numbered lists:

In an ordered list, the value is the number that precedes the list item. Changing the value will change the visual numbering of all following list items. In an unordered list, the value is initially zero. Changing the value has no visual effect on the item.

More than that it informs that "value" is deprecated.

It references DOM Level 1 (http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-74680021), which defines "value" as a long number, and does state that it is deprecated in HTML 4.0.

Given all that I am tempted to close this ticket as "invalid". Thoughts?

comment:6 Changed 10 years ago by bill

It doesn't seem too important, but I figured it would be a simple fix since node.getAttribute("value") works correctly. Not so?

comment:7 Changed 10 years ago by Eugene Lazutkin

Milestone: 1.4future
Priority: highlow

comment:8 Changed 7 years ago by bill

Resolution: wontfix
Status: assignedclosed

Given the decline of IE7, probably this won't be fixed.

Note: See TracTickets for help on using tickets.