Open Bug 293843 Opened 19 years ago Updated 11 months ago

the disabled attribute on radiogroups has no effect

Categories

(Core :: XUL, defect)

x86
Windows XP
defect

Tracking

()

People

(Reporter: twanno, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

When specifying the disabled attribute on radiogroups as disabled="true", the
radiogroup and the radio buttons in it are not disabled.
Also the DOM setAttribute() function does not update the radiogroups as
appearing disabled. The only whay to let a radiogroup appear disabled is by
setting it's disabled property through javascript

Reproducible: Always

Steps to Reproduce:
1.create a xul document with a radiogroup and specify disabled="true"
2.load the document in Mozilla / Firefox
3.

Actual Results:  
The radio buttons in the radiogroup don't appear disabled, you still can change
the value

Expected Results:  
The radio buttons in the radiogroup should appear disabled
The testcase is showing three ways to disable a radiogroup:
1) with the disabled attribute set to true (this doesn't work)
2) setting the disabled property to true on page load (this does work)
3) with DOM setAttribute(), removeAttribute() methodes (this doesn't work,
although the disabled attribute is updated by these methodes)
I don't know if this is the way to go with this bug, maybe it is better to
solve it in nsIAccessibilityService and related interfaces.
Or maybe even in nsIWidgetStateManager.js, but I don't know how that code
works.

Anyway I have tested this and it solves the issues whith the disabled attribute
on radiogroups; it will let the testcase work.

BTW this patch is for toolkit's radio.xml, but it is broken in Mozilla Suite as
well as in Firefox, so I thought the Core / XP Toolkit/Widgets Component was
the best place to file this bug. Should I also make a patch for xpfe or should
I file a separate bug for Toolkit?
Keywords: testcase
confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2)
Gecko/20050527 Firefox/1.0+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Setting a radiogroup's value attribute doesn't change the selected radio button,
but settings its value property does. Same goes for the disabled attribute.
Currently in both cases you need extra work when writing your XUL if you want to
prefill a particular value or initially disable the radiogroup, so the first
part of the patch may still be acceptable.
Depends on: 371260
(In reply to comment #4)

<snip/>

> Currently in both cases you need extra work when writing your XUL if you want
> to
> prefill a particular value or initially disable the radiogroup, so the first
> part of the patch may still be acceptable.

This is already part of radio.xml (part of patch for bug 371260):
http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/radio.xml#16 

Assignee: jag → nobody
Teune, is anything remaining to be done here?
Flags: needinfo?(twanno)
Severity: normal → S3

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit BugBot documentation.

Flags: needinfo?(twanno)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: