Opened 11 years ago

Last modified 10 years ago

#10440 closed defect

ColorPicker does not work in TooltipDialog — at Version 1

Reported by: Adam Peller Owned by: dante
Priority: high Milestone: 1.5
Component: DojoX Widgets Version: 1.4.0b
Keywords: Cc: bill
Blocked By: Blocking:

Description (last modified by bill)

The ColorPicker appears, but click on something and the color turns to gray. Apparently, this is because measurements are taken in postCreate() where the element is hidden. Bill says measurements should not be taken in postCreate -- apparently they should be done in startup(), though this would require the user to call startup on something which is not a layout container. There is already a startup method, though I'm not sure why it needs to do the value set there.

So we should consider that change, just to follow dijit rules, but I'm not sure this would solve the problem since startup also seems to be called for TooltipDialog content before it is visible. Do we need to consider implementing something like layout()?

Change History (2)

Changed 11 years ago by Adam Peller

Attachment: test_TooltipDialog.html added

TooltipDialog test modified to use ColorPicker

comment:1 Changed 11 years ago by bill

Description: modified (diff)

Well, it needs a resize() method where the layout is done (even though technically there's no size change).

Startup() should call resize(), either all the time or at least when the ColorPicker isn't inside a layout widget.

In #10402 I'm considering passing a flag to startup() about whether or not the child widget is inside a layout widget, that will make it easier.

Note: See TracTickets for help on using tickets.