Open Bug 294029 Opened 20 years ago Updated 2 years ago

XUL listitem with "listitem-iconic" loose his icons when scrolling down or up

Categories

(Core :: XUL, defect)

x86
Windows 2000
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mgueury, Unassigned)

References

(Depends on 1 open bug, )

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

I wrote an extension for Firefox.
In this context, I needed to display a list of items with a icon next to them
and beeing able to select it.

All is fine when it appears the first time. But if the list is longer than
the size of the listbox. When scrolling the icons disappears.

The listbox is declared like this:

<listbox id="tidy.choose_source.list" flex="1" aclass="inset" seltype="multiple" 
     width="600" 
      ondblclick="oTidyChooseSource.onOk()"
/> 

And the items added like this:
>  var item = this.xulList.appendItem( str+ " - " + doc.URL, doc.URL );
>  item.image = icon+".png";
>  item.className= "listitem-iconic";


Reproducible: Always

Steps to Reproduce:
I will give you a direct link to the extension 0.59 to be sure that you
reproduce the issue.

Windows (version 0.5.9)
http://htmlvalidator.sourceforge.net/mozilla/tidy_firefox_win_059.xpi
Linux (version 0.5.9)
http://htmlvalidator.sourceforge.net/mozilla/tidy_firefox_linux_059.xpi
MacOsX (version 0.5.9)
http://htmlvalidator.sourceforge.net/mozilla/tidy_firefox_macos_059.xpi

Windows (version 0.59) For firefox 1.1 beta
http://htmlvalidator.sourceforge.net/mozilla/tidy_firefox_11_win_059.xpi

0. install the extension in firefox or mozilla
1. Download the zip file with the testcase
2. Open the file test.html
3. In the status bar, you should have a icon with the status and 
   errors numbers
4. Double click on the icon
   -> a windows (Choose source) opens with a lot of icon like (?) /!\ 
      and so on to choose a frame from the original page
   -> stay in that small windows and scroll down. You will see that the 
      icons at the bottom are not there.

This is the bug. (I will upload a screenshot to be sure)

Actual Results:  
The listbox show icons for the first items.
But for items that you need to scroll to see them, the icons are missing

Expected Results:  
See the icons.
Attached file Testcase
Attached image Screenshot
Known XBL issue, covered in another bug somewhere.

Basically the XBL for the listitem only gets attached for the visible listitems,
so setting .image sets a JS property on the DOM wrapper rather than invoking the
XBL property. The workaround is to set the image attribute instead.
Depends on: 250123
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: