Opened 13 years ago

Closed 13 years ago

#8629 closed defect (invalid)

dojo.getComputedStyle race condition

Reported by: ben hockey Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


dojo.getComputedStyle seems to have a race condition that causes it to incorrectly calculate the position of a node. i have attached an html and a css file that shows this error. if i set a breakpoint before the call to dojo.getComputedStyle in the resize function of dijit.layout._LayoutWidget (eg line 94) then the correct value is calculated - this is what leads me to believe that it's a race condition. this happens with trunk (i assume it would be 1.3 beta1 code)

Attachments (2)

common.css (3.0 KB) - added by ben hockey 13 years ago.
explorerDojo.html (2.4 KB) - added by ben hockey 13 years ago.

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by ben hockey

Attachment: common.css added

Changed 13 years ago by ben hockey

Attachment: explorerDojo.html added

comment:1 Changed 13 years ago by bill

Resolution: invalid
Status: newclosed

You are seeing the race condition loading JS vs. CSS... we've addressed this in our test cases and documentation by putting the CSS includes as the first thing in the file, before including even dojo.js. That fixes your test case too.

There are other tickets open about new features like dojo.requireCss(), which would eliminate this issue, but as for now, including the CSS first is the only supported configuration for dojo/dijit.

Note: See TracTickets for help on using tickets.