Closed Bug 270284 Opened 20 years ago Closed 20 years ago

XUL - seltype=multiple listbox disabled can not be programatically changed

Categories

(SeaMonkey :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 98595

People

(Reporter: news, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

if you have a listbox with seltype=multiple, and a script somewhere that gets
that element by it's id and sets the disabled property to true, it has no
effect.  Doing that on other elements works fine.

Reproducible: Always
Steps to Reproduce:
1. Create a XUL file with a listbox with seltype=multiple
2. Create a script that retrieves that element by it's id and sets disabled to
true (and attach that script to a command somewhere)
3. Invoke it, and watch as nothing happens ;-)

Actual Results:  
Absolutely nuthin.

Expected Results:  
disabled the listbox.
Product: Browser → Seamonkey
Please attach a file showing the problem to this bug using
https://bugzilla.mozilla.org/attachment.cgi?bugid=270284&action=enter
Here's a XUL file that demonstrates the problem in setting disabled for a
listbox. Currently, it looks like disabled for listboxes is just broken. It
doesn't matter if you use <listbox disabled="true"  or set .disabled via
javascript - the listbox does not behave as expected.

This recreation compares and contrasts the disabled behaviors of a listbox vs
an html:select box.
hmm.. our behavior seems to correspond with the description at XULPlanet:

disabled

  Type: boolean

  Indicates whether the listbox is disabled or not. If this attribute is set to
  true, the listbox is disabled. This is usually drawn with the text in grey. If
  the listbox is disabled, it does not respond to user actions. The element
  cannot be focused and the command event will not fire. The element will still
  respond to mouse events. To enable the listbox, leave the attribute out
  entirely as opposed to setting the value to false.

We're indeed not firing the command event, as far as I can tell, and not making
the element focusable, and are still responding to mouse events...

*** This bug has been marked as a duplicate of 98595 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: