There are two window.onload statements in CS (template.php and page.tpl.php) which breaks Drupal 4.7 JS. The CS JS should be synced to 4.7JS
There are two window.onload statements in CS (template.php and page.tpl.php) which breaks Drupal 4.7 JS. The CS JS should be synced to 4.7JS
Comments
Comment #1
traemccombs commentedFiling this as a bug for the 4.7 port.
Chx, if you have a fix for this, which it seems you do, can you please post a patch?
Thanks,
Trae
Comment #2
chx commentedI do not have, I merely killed the JS as the site we were working on did not require the fancy filter tips.
Comment #3
douggreen commentedSee Civicspace Theme & Drupal 4.7 for a fix
Comment #4
sweetooth commentedDrupal uses the onload event to handle a lot of JS stuff, but sometimes you want to also use onload. Directly using window.onload will cause any previously set events to be cancelled basically. Simon Willison came up with a nice method for adding onload events into a queue basically, and this is the method that I use to call functions in themes rather than using window.onload etc. The comment is mine, the code was written by Simon Willison and links to his article describing the issue.
So, the solution. Include the below javascript and then when you want to add events to the onload use
addLoadEvent( myFunction() );instead of
window.onload = myFunction();or other methods.
As far as I know drupal doesn't provide any methods to append to the onload event, but of course I could be wrong.
Comment #5
douggreen commentedThe CIvicSpace theme was never fully upgraded to 4.7. Given that we're now working on 6.x, I'm marking this issue as won't fix.