Author: pyaschenko
Date: 2008-04-28 09:05:21 -0400 (Mon, 28 Apr 2008)
New Revision: 8232
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
Log:
http://jira.jboss.com/jira/browse/RF-3280
http://jira.jboss.com/jira/browse/RF-2983
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
===================================================================
---
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-04-28
13:02:50 UTC (rev 8231)
+++
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-04-28
13:05:21 UTC (rev 8232)
@@ -3,8 +3,8 @@
initialize: function(tree) {
this.tree = tree;
- this.eventKeyPress = this.processKeyDown.bindAsEventListener(this);
- Event.observe(document, "keydown", this.eventKeyPress);
+ this.eventKeyDown = this.processKeyDown.bindAsEventListener(this);
+ Event.observe(document, "keydown", this.eventKeyDown);
this.eventLostFocus = this.processLostFocus.bindAsEventListener(this);
Event.observe(document, "click", this.eventLostFocus);
@@ -12,9 +12,12 @@
this.eventPreventLostFocus = this.processPreventLostFocus.bindAsEventListener(this);
Event.observe(this.tree.element, "click", this.eventPreventLostFocus);
},
-
+
destroy: function() {
- Event.stopObserving(document, "keydown", this.eventKeyPress);
+ this.activeItem = null;
+ this.tree = null;
+
+ Event.stopObserving(document, "keydown", this.eventKeyDown);
Event.stopObserving(document, "click", this.eventLostFocus);
},