Author: alevkovsky
Date: 2008-10-27 10:53:56 -0400 (Mon, 27 Oct 2008)
New Revision: 10911
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
Log:
RichEditor: fix js error after IE closing
Modified:
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
---
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-27
14:31:19 UTC (rev 10910)
+++
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-27
14:53:56 UTC (rev 10911)
@@ -26,28 +26,29 @@
theme: this.params.theme,
init_instance_callback : this.onInitInstanceCallback.bind(this)
});
-
+
this.onBeforeAjaxListener = new A4J.AJAX.AjaxListener("onbeforeajax",
this.onBeforeAjax.bind(this));
A4J.AJAX.AddListener(this.onBeforeAjaxListener);
},
- destruct: function() {
- A4J.AJAX.removeListener(this.onBeforeAjaxListener);
- this.onBeforeAjaxListener = null;
- this.tinyMCE_editor.remove();
- this.tinyMCE_editor = null;
+ destruct: function(isAjax) {
+ A4J.AJAX.removeListener(this.onBeforeAjaxListener);
+
+ if(isAjax){
+ this.tinyMCE_editor.remove();
+ }
},
onBeforeAjax: function() {
- //var content = this.tinyMCE_editor.getContent();
- //$(this.editorTextAreaId).value = content;
this.tinyMCE_editor.save();
},
- onInitInstanceCallback: function() {
+ onInitInstanceCallback: function() {
this.tinyMCE_editor = tinyMCE.get(this.editorTextAreaId);
//TODO add user init_instance_callback function
}
+
+
});
\ No newline at end of file
Show replies by date