Author: pyaschenko
Date: 2008-04-16 11:24:09 -0400 (Wed, 16 Apr 2008)
New Revision: 7874
Modified:
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-3071
Modified:
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-16
14:07:45 UTC (rev 7873)
+++
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-16
15:24:09 UTC (rev 7874)
@@ -868,7 +868,9 @@
isWithin : function(event){
var within = true;
var targetElement = event.relatedTarget;
- while (targetElement.nodeType!=1) targetElement = targetElement.parentNode;
+
+ while (targetElement && targetElement.nodeType!=1) targetElement =
targetElement.parentNode;
+
var srcElement = event.target;
var layer = $(this.id);
if (targetElement) {
@@ -1201,7 +1203,7 @@
var within = false;
Event.extend(event);
var targetElement = event.relatedTarget;
- while (targetElement.nodeType!=1) targetElement = targetElement.parentNode;
+ while (targetElement && targetElement.nodeType!=1) targetElement =
targetElement.parentNode;
if (targetElement) {
within = targetElement == element ||