Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15558 closed defect (fixed)

dijit.form.Select inside dojox.layout.ContentPane appears empty until clicked

Reported by: talisto Owned by: bill
Priority: undecided Milestone: 1.8
Component: DojoX Layout Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

when a dijit.form.Select widget is wrapped in a dojox.layout.ContentPane?, the select box appears "empty" (no options) until it is clicked, and then the first/selected option is displayed.

The select widget works fine outside the contentPane, so I'm unsure which widget this is an issue with.

Attached is a simple test-case to illustrate the issue. This is only an issue with 1.8.0b1, not 1.7.3.

Attachments (1)

select.html (675 bytes) - added by talisto 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by talisto

Attachment: select.html added

comment:1 Changed 7 years ago by Douglas Hays

Milestone: tbd1.8

started with [28344]

comment:2 Changed 7 years ago by Douglas Hays

Looks like a possible problem with dojox ContentPane? as Select startup is not being called since the ContentPane? getChildren is returning nothing, probably related to onLoadDeferred processing.

comment:3 Changed 7 years ago by Douglas Hays

Component: Dijit - FormDijit
Owner: changed from Douglas Hays to bill
Status: newassigned

comment:4 Changed 7 years ago by bill

Component: DijitDojoX Layout

Doug traced this down to an ordering problem, that dojox.layout.ContentPane is calling startup() on it's children before the parser runs. Obviously the parser should run first; otherwise there won't be any children.

I consider the bug to be in dojox.layout.ContentPane, although fixing it requires code changes across all three projects.

comment:5 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29052]:

For dojox/layout/ContentPane, ensure that startup() on children is called after the parser runs, rather than before:

  1. Make dojox/html/_base::_ContentSetter.onEnd() return a Promise that resolves after both the require() calls finish and the parser finishes. (The parser may also be asynchronous since it will auto-require unloaded modules and since it has a syntax for manual requires.)
  1. Make dojox/html/_base::_ContentSetter.set() return a Promise that resolves when loads and parse complete. dojo/html::_ContentSetter.set() keeps it's old API of returning a node until 2.0.
  1. Make dojox/layout/ContentPane use the Promise returned from set(), rather than _ContentSetter.parseDeferred, since _ContentSetter.parseDeferred may not even exist until sometime after set() returns.

Fixes #15558 !strict.

comment:6 Changed 7 years ago by talisto

That works great! Thanks, bill!!

comment:7 Changed 7 years ago by bill

In [29097]:

fix exception when onEnd() returns null, regression from [29052], refs #15558 !strict.

Note: See TracTickets for help on using tickets.