enyo / opentip

Opentip is an open source javascript tooltip based on the protoype framework.
http://www.opentip.org
1.25k stars 401 forks source link

Tips never get created on IE < 9, if user adds them inside a window load listener #7

Closed nickdaugherty closed 12 years ago

nickdaugherty commented 12 years ago

On IE less than 9, if the user sets up tips inside his own window load listener, the tips never get setup. The reason for this is fairly complicated, but comes down to 2 things:

If the user has an onload listener that configures tips, it can be fired before the Opentip listener (about line 255) that sets Opentip.documentLoaded. If that's the case, the code block around line 92 is executed, but due to the first problem above, that second window load listener never fires, so the tip never gets created.

I'll submit a pull request with a fix shortly.

enyo commented 12 years ago

Thanks a lot Nick. I'll look into it and merge it as soon as I have some time (probably next week). Cheers.