Author: sergeyhalipov
Date: 2008-01-14 14:36:19 -0500 (Mon, 14 Jan 2008)
New Revision: 5365
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-1862
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-14
18:53:55 UTC (rev 5364)
+++
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-01-14
19:36:19 UTC (rev 5365)
@@ -112,14 +112,19 @@
if (menuLayer.refItem) menuLayer.refItem.highLightGroup(false);
} else if (!visible && visibleFlag) {
var menuLayer = this.layers[menu.id];
- if (menuLayer && menuLayer.eventOnOpen) menuLayer.eventOnOpen();
- if (menuLayer && menuLayer.eventOnExpand) menuLayer.eventOnExpand();
-
- if (menuLayer.level>0) {
- do {
- menuLayer = this.layers[(this.father[menuLayer.id])];
- } while (menuLayer.level > 0)
- if (menuLayer && menuLayer.eventOnGroupActivate)
menuLayer.eventOnGroupActivate();
+ if (menuLayer) {
+ if (menuLayer.eventOnOpen) {
+ menuLayer.eventOnOpen();
+ }
+ if (menuLayer.eventOnExpand) {
+ menuLayer.eventOnExpand();
+ }
+ if (menuLayer.level && menuLayer.level > 0) {
+ do {
+ menuLayer = this.layers[(this.father[menuLayer.id])];
+ } while (menuLayer.level > 0)
+ if (menuLayer && menuLayer.eventOnGroupActivate)
menuLayer.eventOnGroupActivate();
+ }
}
}
},
@@ -316,7 +321,7 @@
e = window.event;
}
Event.stop(e);
- this.event = e;
+ this.event = Object.clone(e);
this.element = Event.element(e);
this.layer = $(layer);
this.show = function() {