Ticket #5677 (new defect)
[dojox.image] ThumbnailPicker in hidden panes has display issues
| Reported by: | guest | Owned by: | dante |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.3 |
| Component: | Dojox | Version: | 1.0 |
| Severity: | normal | Keywords: | dojox.image.ThumbnailPicker |
| Cc: |
Description (last modified by dante) (diff)
If one places a ThumbnailPicker? in a Dialog that's already open, everything works fine. However, if the Dialog is closed (a pretty common case) when it's added, the display of the ThumbnailPicker? gets all messed up. The reason seems to be that the thumbsNode gets an incorrect inline style width (more specifically it gets set to 4 pixels * number of thumbs, e.g. just 16px for 4 thumbs, but 400px for 100 thumbs). For a relative few thumbnails, it renders the picker useless, while for lots of thumbnails it probably won't be noticed.
The behavior seems due to the fact that the marginBox being pulled for the images in the onLoad appears to be returning all zeros.
The same behavior is evident on at least Safari (including WebKit?) and Firefox, and I imagine everywhere else. It may also happen if the ThumbnailPicker? is placed within other presently hidden widgets, but I didn't test beyond the Dialog box.
I don't have a fix, but I do have a workaround: right after the Dialog's show() is called, the ThumbnailPicker? should be sent a reset() followed by an init() to force a reload and redraw. This is (obviously) not the quickest or most efficient of operations.