click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Schellink (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CLK-617) addLoadEvent doesn't always work in IE
Date Fri, 05 Feb 2010 14:18:27 GMT

     [ 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.


Mime
View raw message