Ticket #5677 (new defect)

Opened 7 months ago

Last modified 7 weeks ago

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

Attachments

test_ThumbnailPickerBugs.html (5.5 kB) - added by guest 7 months ago.
ThumbnailPicker? Test Case Showing Bugs

Change History

Changed 7 months ago by bill

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

Changed 7 months ago by peller

please re-verify or include a test case.

Changed 7 months ago by guest

Could the bug described in the forums at http://www.dojotoolkit.org/forum/dojox-dojox/dojox-support/inserting-different-galleries-stackcontainer-pb-thumbnailpicker be a manifestation of this bug? If so, it's not limited to dialogs.

Changed 7 months ago by peller

  • owner changed from peller to dante

Changed 7 months 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 7 months ago by guest

ThumbnailPicker? Test Case Showing Bugs

Changed 6 months ago by dylan

  • milestone set to 1.2

Changed 7 weeks ago by dante

  • summary changed from ThumbnailPicker in Dialog has display issues to [dojox.image] ThumbnailPicker in hidden panes has display issues
  • description modified (diff)
  • milestone changed from 1.2 to 1.3

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

Note: See TracTickets for help on using tickets.