the disabled attribute on radiogroups has no effect

NEW
Unassigned

Status

()

Core
XUL
13 years ago
4 years ago

People

(Reporter: Teune van Steeg, Unassigned, NeedInfo)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
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
(Reporter)

Comment 1

13 years ago
Created attachment 183343 [details]
testcase showing ways to disable radiogroups, but not all ways work

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)
(Reporter)

Comment 2

13 years ago
Created attachment 183346 [details] [diff] [review]
patch which solves the issues with the disabled attribute on radiogroups

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?
(Reporter)

Updated

13 years ago
Keywords: testcase

Comment 3

13 years ago
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

Comment 4

13 years ago
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.

Updated

12 years ago
Depends on: 371260

Comment 5

11 years ago
(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 

Updated

10 years ago
Assignee: jag → nobody

Comment 6

4 years ago
Teune, is anything remaining to be done here?
Flags: needinfo?(twanno)
You need to log in before you can comment on or make changes to this bug.