Closed
Bug 155014
Opened 24 years ago
Closed 20 years ago
cannot disable checked list item after insertion to list box
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
EXPIRED
People
(Reporter: danielwang, Assigned: jag+mozilla)
Details
var lb = document.getElementById("list");
var listitemnode = document.createElement("listitem");
with (listitemnode) {
// setAttribute("id", blah);
setAttribute("label", "sometext");
setAttribute("type", "checkbox");
}
lb.appendChild(listitemnode);
# listitemnode.disabled = true;
# listitemnode.setAttribute("checked", "true");
if the lines marked with # are switched, then the item will be
checked but not disabled. This only happens with list item just
inserted.
| Assignee | ||
Comment 1•24 years ago
|
||
Can you try .setAttribute("disabled", "true") as a work-around? We should fix
this bug at some point though (there should be some bug report about this in
bugzilla already).
Whiteboard: dupeme
| Reporter | ||
Comment 2•24 years ago
|
||
.setAttribute("disabled", "true") and .disabled = true do the same
thing. The only way I can properly disable an inserted check list
item is to .setAttribute("checked", "true") /after/ disabling it.
| Assignee | ||
Comment 3•24 years ago
|
||
I misread your report. I thought with "switched" you meant switched from comment
(even though that's not a legal js comment, guess I needed more coffee) to
statement.
So, while |checkbox.disabled = true| will do |checkbox.setAttribute("disabled",
"true")| (I was aware of this when I made my previous comment), this is only the
case if the checkbox xbl was successfully bound (the failure of this is what I
initially suspected to be the cause of your problem).
I'm not quite sure what's going on here. If it were the other way around (works
fine if you set it to checked first, then set .disabled = true) I would suspect
some timing problem where we don't block javascript while bindings are being
loaded. What you're describing is quite odd.
This applies to which Mozilla version?
Is this only a Windows 98 problem?
Daniel, Is this only a Windows 98 problem?
This applies to which Mozilla version? Did you also try with Mozilla 1.7 final
or later versions?
Comment 6•20 years ago
|
||
This is an automated message, with ID "auto-resolve01".
This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.
While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.
If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.
The latest beta releases can be obtained from:
Firefox: http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 7•20 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → EXPIRED
You need to log in
before you can comment on or make changes to this bug.
Description
•