[ 
http://issues.apache.org/jira/browse/MYFACES-870?page=comments#action_12358473 
] 

Volker Weber commented on MYFACES-870:
--------------------------------------

Bruno,

you had missing a closing catch statement. Diff follows


Index: 
tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js
===================================================================
--- 
tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js    
    (Revision 348769)
+++ 
tomahawk/src/java/org/apache/myfaces/custom/calendar/resource/popcalendar.js    
    (Arbeitskopie)
@@ -544,6 +544,9 @@
                        topScrollOffset += aTag.scrollTop;
                        aTag = aTag.parentNode;
                } while(aTag.tagName!="BODY");
+       } catch (ex) {
+       // ignore
+    }

        var bodyRect = getVisibleBodyRectangle();
        var cal = document.getElementById("calendar");


> IE6: NPE in JavaScript when using <t:calendarInput>
> ---------------------------------------------------
>
>          Key: MYFACES-870
>          URL: http://issues.apache.org/jira/browse/MYFACES-870
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.1.1
>  Environment: Windows XP SP2
> IE6
>     Reporter: Roland Huss
>     Assignee: Bruno Aranda
>      Fix For: Nightly

>
> This Javascript error occurs in 
>  do {
>                 aTag = aTag.offsetParent;
>                 leftpos += aTag.offsetLeft;
>                 toppos += aTag.offsetTop;
>         } while(aTag.tagName!="BODY");
> when offsetParent is null. This seems to occur on occasion in IE (e.g. within 
> a div with absolute positioning). 
> The same problem is described in TAPESTRY-173 and TAPESTRY-222.
> A similar problems occurs at
>  while(objParent.tagName.toUpperCase() != "BODY" ){
>         objLeft  += objParent.offsetLeft;
>         objTop   += objParent.offsetTop;
>         objParent = objParent.offsetParent;
>       }
> Again, offsetParent can be null in IE6. An additional condition in the while 
> loop prevents this gotcha.
> These problems doesn't occur on firefox 1.0.x
> My temporary solution is to catch the NPE and simply ignore it. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to