bf4 / controljs

Automatically exported from code.google.com/p/controljs
Apache License 2.0
0 stars 0 forks source link

Delayed Execution not Working #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to the demo at: 
http://stevesouders.com/controljs/examples/menu.php?t=1292507992
2. Click on the dropdown menu

What is the expected output? What do you see instead?
The menu should display but does not.

What version of the product are you using? On what operating system?
Tested on Chrome 8.0.552.231, Firefox 3.6.12, and Safari 5.0.2.

Please provide any additional information below.

The following is output to the console window:

/controljs/control.js:392CJS 1292508483467: downloading 
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?t=1292508483
/controljs/control.js:392CJS 1292508483469: downloading fg.menu.js?t=1292508483
/controljs/control.js:392CJS 1292508483854: processInlineScript: processing 
script code: 
function createExamplesMenu() {
    $('#examplesbtn').menu({ conte
/controljs/control.js:392CJS 1292508483857: DONE processing scripts
/controljs/control.js:392CJS 1292508484687: execScript: 
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js?t=1292508483
/controljs/control.js:392CJS 1292508484687: execScript: fg.menu.js?t=1292508483
/controljs/control.js:392CJS 1292508484687: execScript: queueing for later: 
fg.menu.js?t=1292508483

Original issue reported on code.google.com by timkadle...@gmail.com on 16 Dec 2010 at 2:12

GoogleCodeExporter commented 9 years ago
Same issues in Chrome 9.0.597.19 dev Win XP SP3 and Chromium 6.0.472.63 (59945) 
Ubuntu 10.10

Original comment by musicisair on 16 Dec 2010 at 2:34

GoogleCodeExporter commented 9 years ago
Same in Firefox 3.6.13 and Chrome 8.0.552.224 on linux

Original comment by iwiz...@gmail.com on 16 Dec 2010 at 6:33

GoogleCodeExporter commented 9 years ago
Within CJS.executeScript()  the callback was not being initialized when the 
onload parameter was null.   Attached is a patch that resolves this by: 
   * assigning `onload` to a NOOP function (`new Function()`) when null
   * unifying installation of the onload event w/ the onreadystatechange event
   * consolidates readyState property sniffing into a single function

Original comment by serverhe...@gmail.com on 16 Dec 2010 at 7:54

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r8.

Original comment by stevesou...@gmail.com on 16 Dec 2010 at 8:58

GoogleCodeExporter commented 9 years ago
serverherder found the bug. It's a one line fix, but his patch is more elegant. 
I've incorporated (a modified version) of it. And thanks for the tip of setting 
.onload before .src. This was an incredibly helpful patch!

I confirmed fix on Chrome 8.0.552.224, Firefox 3.6.13, Safari 4.0.4 on Windows 
XP.

Original comment by stevesou...@gmail.com on 16 Dec 2010 at 9:28