incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r497834 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
Date Fri, 19 Jan 2007 14:47:28 GMT
Author: matzew
Date: Fri Jan 19 06:47:28 2007
New Revision: 497834

URL: http://svn.apache.org/viewvc?view=rev&rev=497834
Log:
avoid JS error "document has no properties" when accessing document.defaultView (only happend
during the dialog windows)

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js?view=diff&rev=497834&r1=497833&r2=497834
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/Core.js
Fri Jan 19 06:47:28 2007
@@ -615,11 +615,12 @@
  * Safely retrieve the top accessible window
  */
 function _getTop(element)
-{  
-  var initialDocument = (element)
+{
+	
+  var initialDocument = (element && element.ownerDocument)
                           ? element.ownerDocument
                           : document;
-                       
+  
   // since top might be in another domain, crawl up as high as possible manually
   var currWindow = _getWindowForDocument(initialDocument);
   var currParentWindow = _getParentWindow(currWindow);



Mime
View raw message