Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#8651 closed defect (fixed)

RadioButton: always checked on IE

Reported by: sayuri Owned by: Douglas Hays
Priority: high Milestone: 1.3
Component: Dijit - Form Version: 1.3.0b1
Keywords: Cc: magicalsayuri@…
Blocked By: Blocking:

Description

IE6 on XP, IE7 on Vista. RadioButton works fine on Firefox.

if a RadioButton is clicked, it becomes checked and all other RadioButtons are unchecked. but on IE, RadioButtons are not unchecked.

is this dojo.query()'s bug?

Change History (9)

comment:1 Changed 11 years ago by bill

Milestone: tbd1.3
Owner: set to Douglas Hays

Hmm, that's strange. It does reproduce on test_CheckBox.html.

Doug, can you take a look? If it is a dojo.query() bug then we should pass it on to Alex.

comment:2 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [16685]) Fixes #8651. The attribute = operator is not working on IE.

comment:3 Changed 11 years ago by Douglas Hays

^= operator

comment:4 Changed 11 years ago by sayuri

Something wrong. RadioButton of 1.3.0b1 did not use ^= operator.

I tried some patternes.

// trunk
dojo.query('INPUT[type=radio][name^="TheName"]', ...
// 1.3.0u1
dojo.query('INPUT[type=radio][name="TheName"]', ...
// 1.2.3
dojo.query('INPUT[type=radio][name=TheName]', ...

but every patternes were failed. so dojo.query() on IE dose not support 'INPUT[name=]' ?

comment:5 Changed 11 years ago by sayuri

Resolution: fixed
Status: closedreopened

I found bug at dijit.form._FormWidget._setNameAttr() function. IE6 and IE7 do not support changing name property. see http://msdn.microsoft.com/en-us/library/ms534184(VS.85).aspx

Internet Explorer 8 and later can set the NAME attribute at run time on elements dynamically created with the createElement method. To create an element with a NAME attribute in earlier versions of Internet Explorer, include the attribute and its value when using the createElement method.

RadioButton create <input type="radio" /> w/o name property. so dojo.query() could not find anything.

comment:6 Changed 11 years ago by bill

Even on IE6, you can set the name anytime before the DOM node is added to the document. Possibly myCheckbox.attr('name', 'foo') doesn't work, if myCheckbox is already attached to <body>, but that's not the issue here.

What makes you think there's a bug? The nightly test is working fine. If you have a test that's failing then please attach it. (Although, you should open another ticket unless it's the same original problem as this ticket.)

comment:7 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

The original problem is fixed. Please open a different ticket with testcase attached.

comment:8 Changed 11 years ago by Douglas Hays

Ticket #8660 opened to track the name problem on IE.

comment:9 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.