Closed
Bug 7127
Opened 25 years ago
Closed 24 years ago
clicking label of checkbox does check though checkbox disabled
Categories
(Core :: Layout: Form Controls, defect, P3)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: Brade, Assigned: pollmann)
Details
(Keywords: testcase, Whiteboard: [TESTCASE])
Attachments
(1 file)
(deleted),
text/xul
|
Details |
Below is the source for "text.xul" which exhibits this bug.
The bug is that a label for a checkbox allows the user to set or remove the check
even though the checkbox itself has been disabled.
To exercise the bug simply click the radio button to "disable elements" and then
click the label for the checkbox.
<?xml version="1.0"?>
<?xml-stylesheet href="resource:/res/samples/xul.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
width="300" height="300" onload="onLoad()">
<html:script>
function disablingOfElements()
{
// disable checkbox
var constrainCheckbox =
document.getElementById("dimConstrain.checkbox");
if ( constrainCheckbox )
{
constrainCheckbox.setAttribute( "disabled", "true" );
}
}
function enablingOfElements()
{
// enable checkbox
var constrainCheckbox =
document.getElementById("dimConstrain.checkbox");
if ( constrainCheckbox )
{
constrainCheckbox.removeAttribute( "disabled" );
}
}
function onLoad()
{
disablingOfElements();
}
function dimConstrainClick()
{
}
</html:script>
<html:p> Click on the text "BUG" below </html:p>
<html:br/>
<box align="vertical">
<html:input type="radio" id="disabling.radio" value="1" onclick=
"disablingOfElements()" />
<html:label for="disabling.radio"> Disabled elements</html:label>
<html:br/>
<html:input type="radio" id="enabling.radio" onclick="enablingOfElements()" /
>
<html:label for="enabling.radio"> Enabled elements</html:label>
</box>
<html:br/>
<html:input type="checkbox" id="dimConstrain.checkbox" onclick=
"dimConstrainClick()" />
<html:label for="dimConstrain.checkbox">BUG</html:label>
</window>
Reporter | ||
Comment 1•25 years ago
|
||
The same problem can be created by clicking on a label for input type="text" that
has been disabled. Do you want that written up as a separate bug?
Updated•25 years ago
|
Assignee: karnaze → pollmann
Comment 2•25 years ago
|
||
Reassigning to Eric.
Comment 3•25 years ago
|
||
Kathy, one bug is sufficient.
Reporter | ||
Comment 4•25 years ago
|
||
Possibly these should be in another bug (let me know if you want me to create
it).
Clicking in the label for the following items activates its corresponding
controls even they the controls are disabled:
html:input type="text"
html:input type="password"
html:input type="file"
note: unlike the initial report of checkboxes and radio buttons, with the above
input types, the controls themselves can be clicked in to activate them (even
though they've been set to disabled).
Reporter | ||
Comment 5•25 years ago
|
||
Windows also has this bug; resetting platform/os to ALL since it may very well
be an XP bug.
OS: Mac System 8.5 → All
Hardware: Macintosh → All
Moving all Widget Set bugs, past and present, to new HTML Form Controls
component per request from karnaze. Widget Set component will be retired
shortly.
Updated•25 years ago
|
Whiteboard: [TESTCASE]
Target Milestone: M13 → M15
Comment 7•25 years ago
|
||
Attaching the [TESTCASE] and setting to M15.
Comment 8•25 years ago
|
||
Comment 9•25 years ago
|
||
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Comment 10•25 years ago
|
||
Kathy, if I understand the behaviour, the original bug states that the checkbox
was still active (able to check and uncheck it) even tho' the radio button told
the checkbox it was disabled...is that correct?
The testcase is disabling the checkbox when you select the 'Disable Elements'
radiobutton, and if this is correct and expected behaviour, I can close this bug
out...
Comment 13•24 years ago
|
||
Is the net customer impact here that we are unable to disable form controls from
JavaScript? How widely is this functionality used on the Web?
Assignee | ||
Comment 14•24 years ago
|
||
That is pretty much the net effect. The checkbox will look disabled, but you
can still check it. I haven't tested this with recent builds - may have been
fixed.
Comment 15•24 years ago
|
||
I'm testing this on 2000051720 Win2K, and it looks OK... The disabled checkbox
doesn't select if I click the label.
Comment 16•24 years ago
|
||
Marking FIXED per those comments. QA please verify.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•