Opened 14 years ago

Closed 14 years ago

#5677 closed defect (duplicate)

[dojox.image] ThumbnailPicker in hidden panes has display issues

Reported by: guest Owned by: dante
Priority: high Milestone: 1.3
Component: Dojox Version: 1.0
Keywords: dojox.image.ThumbnailPicker Cc:
Blocked By: Blocking:

Description (last modified by dante)

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.

Attachments (1)

test_ThumbnailPickerBugs.html (5.5 KB) - added by guest 14 years ago.
ThumbnailPicker? Test Case Showing Bugs

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by bill

Presumably already fixed along with #5669 (just checked in a few hours ago).

comment:2 Changed 14 years ago by Adam Peller

please re-verify or include a test case.

comment:3 Changed 14 years ago by guest

Could the bug described in the forums at be a manifestation of this bug? If so, it's not limited to dialogs.

comment:4 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to dante

comment:5 Changed 14 years ago by guest

OK, I've created a simple test case based upon test_ThumbnailPicker.html that can be run from the ThumbnailPicker? tests directory. Since I originally suspected that it might also apply to other hidden widgets (and especially since someone else had a problem with a hidden ContentPane? within a StackContainer? and mentioned it in the forums) I included both the case of a hidden Dialog and the case of a hidden ContentPane?.

The current nightlies (presumably due to the fix for #5669) correct the Dialog box case but not the ContentPane? case.

I scanned through the other bugs reported against the ThumbnailPicker?, and bug #5650 can also be very easily verified with this test case.

Additionally, while creating this test case I possibly found yet another bug; ThumbnailPicker? doesn't seem to honor the start field in a request. This behavior is also easy to see with this test case.

Changed 14 years ago by guest

ThumbnailPicker? Test Case Showing Bugs

comment:6 Changed 14 years ago by dylan

Milestone: 1.2

comment:7 Changed 14 years ago by dante

Description: modified (diff)
Milestone: 1.21.3
Summary: ThumbnailPicker in Dialog has display issues[dojox.image] ThumbnailPicker in hidden panes has display issues

we should kick this hidden rendering this for 1.3 ...

comment:8 Changed 14 years ago by bill

Resolution: duplicate
Status: newclosed

Closing in favor of #8144.

Note: See TracTickets for help on using tickets.