#7355 closed defect (fixed)
dojo.attr() cannot retrieve value="" attributes on form elements in IE 6
Reported by: | paulprince | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | HTML | Version: | 1.1.1 |
Keywords: | Cc: | paul@… | |
Blocked By: | Blocking: |
Description
Returns null value instead.
Retrieving other attributes seems to work.
Not sure in what other situations this bug might be triggered.
phiggins tested against trunk... attaching his modifications to my test case.
Attachments (1)
Change History (13)
Changed 11 years ago by
Attachment: | dojobreak.html added |
---|
comment:1 Changed 11 years ago by
Milestone: | tbd → future |
---|
comment:2 Changed 11 years ago by
Milestone: | future → 1.2 |
---|---|
Owner: | changed from anonymous to dylan |
Status: | new → assigned |
comment:3 Changed 11 years ago by
FYI I assume this is why CheckBox?.js has the code:
if(this.value == ""){ this.value = "on"; }
(because the parser is reporting that the user has specified a value initialization parameter when really they haven't)
comment:4 Changed 11 years ago by
The problem seems to be with the IE's getAttributeNode
. When you ask it for the attribute node value
, the specified
property is set to false
(which is wrong because value
is set to a non-default value). It gets called from hasAttr
which gets called by attr
on line 1254:
return (typeof attrValue == 'boolean' || typeof attrValue == 'function') ? attrValue : (d.hasAttr(node, name) ? node.getAttribute(name) : null);
I don't know if it is necessary to call d.hasAttr(...)
in this case. Is there some advantage over changing it to:
return (typeof attrValue == 'boolean' || typeof attrValue == 'function') ? attrValue : node.getAttribute(name);
Please advise.
comment:5 Changed 11 years ago by
Milestone: | 1.2 → 1.3 |
---|
as per today's meeting, punting these core bugs
comment:6 Changed 11 years ago by
Milestone: | 1.3 → future |
---|
I haven't had time to tackle this one... no obvious solution in my eyes, so marking as future unless there are objections.
comment:7 Changed 11 years ago by
Owner: | changed from dylan to Eugene Lazutkin |
---|---|
Status: | assigned → new |
comment:8 Changed 11 years ago by
Status: | new → assigned |
---|
comment:9 Changed 11 years ago by
Component: | Core → HTML |
---|
comment:11 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 Changed 10 years ago by
Milestone: | future → 1.4 |
---|
phiggins'-provided simple test case