You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Bob Schellink (JIRA)" <ji...@apache.org> on 2010/02/05 15:18:27 UTC

[jira] Resolved: (CLK-617) addLoadEvent doesn't always work in IE

     [ https://issues.apache.org/jira/browse/CLK-617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob Schellink resolved CLK-617.
-------------------------------

    Resolution: Fixed

fixed in trunk

> addLoadEvent doesn't always work in IE
> --------------------------------------
>
>                 Key: CLK-617
>                 URL: https://issues.apache.org/jira/browse/CLK-617
>             Project: Click
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.1.0 RC1
>            Reporter: Bob Schellink
>            Assignee: Bob Schellink
>             Fix For: 2.1.0
>
>
> Its possible that addLoadEvent doesn't fire correctly when using IFRAMEs in IE.
> On the dev list James have contributed this patch:
> if (window == top) {
>   var d = window.document;
>   (function () {
>     try {
>       d.documentElement.doScroll('left');
>     } catch (e) {
>       setTimeout(arguments.callee, 50);
>       return;
>     }
>     // Dom is ready, run events
>     Click.domready.run();
>   })();
> } else {
>   var d = document;
>   (function () {
>     if (d.body==null) {
>       setTimeout(arguments.callee, 50);
>       return;
>     } 
>     // Dom is ready, run events
>     Click.domready.run();
>   })();
> }
> JQuery also uses a similar check whether document.body is null as well as an onreadystatechange event for IFRAMES:
> More info can be read here:
>   http://www.subprint.com/blog/demystifying-the-dom-ready-event-method/
> and here (see the bindReady and ready functions):
>   http://code.jquery.com/jquery-1.4.js 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.