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

VERIFIED DUPLICATE of bug 98595

Status

SeaMonkey
General
VERIFIED DUPLICATE of bug 98595
14 years ago
14 years ago

People

(Reporter: Dan Litty, Unassigned)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

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

Comment 2

14 years ago
Created attachment 172400 [details]
recreation showing how listboxes are not disabled properly

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...

Comment 4

14 years ago

*** This bug has been marked as a duplicate of 98595 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE

Updated

14 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.