Closed Bug 287771 Opened 19 years ago Closed 19 years ago

using editable attribute on menulist makes it editable even if value is false

Categories

(Core :: XUL, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 114169

People

(Reporter: alessio.spam, Unassigned)

Details

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2

The following code makes the list editable.
The only way to make it non editable is to remove the attribute altogether.

<menulist label='Number' editable='false'>
  <menupopup>
    <menuitem label='1'/>
    <menuitem label='2'/>
    <menuitem label='3' selected='true'/>
    <menuitem label='4'/>
  </menupopup>
</menulist>


Reproducible: Always

Steps to Reproduce:
1. Create a file called test.xul with the following content:

<?xml version='1.0'?>
<window
  id='window1'
  title='Test'
  orient='vertical'
  xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'>

<menulist label='Number' editable='false'>
  <menupopup>
    <menuitem label='1'/>
    <menuitem label='2'/>
    <menuitem label='3' selected='true'/>
    <menuitem label='4'/>
  </menupopup>
</menulist>

</window>



2. Open FireFox



3. Select File | Open File... from the menu and open the test.xul file
Actual Results:  
The menulist is editable

Expected Results:  
The menulist should not be editable
I believe that's the right behavior.  "editable" is a boolean attribute in the
sense that if it's set it means the thing is editable.

On the other hand, I'm not sure XUL is consistent about using that definition....
The Neils are the experts here.
The whole attributes true/false thing has never been fully resolved. See bug
114169 for some discussion.

Generally, it is better to leave the attribute off anyway. I personally think,
though, that xxx="false" should be equivalent to false.
Personally I think the attribute was misnamed, it should have been
<menulist type="editable"> (and <textbox type="multiline"> too).

*** This bug has been marked as a duplicate of 114169 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.