Index: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (révision 8931) +++ typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) @@ -2101,11 +2101,13 @@ 'frameworkready' ); this.addListener({ - afterrender: { - fn: this.initEventListeners, + beforedestroy: { + fn: this.onBeforeDestroy, single: true } }); + // Monitor iframe becoming ready + this.mon(this.iframe, 'iframeready', this.onIframeReady, this, {single: true}); // Let the framefork render itself, but it will fail to do so if inside a hidden tab or inline element if (!this.isNested || HTMLArea.util.TYPO3.allElementsAreDisplayed(this.nestedParentElements.sorted)) { this.render(this.textArea.parent(), this.textArea.id); @@ -2120,8 +2122,6 @@ * Initiate events monitoring */ initEventListeners: function () { - // Monitor iframe becoming ready - this.mon(this.iframe, 'iframeready', this.onIframeReady, this, {single: true}); // Make the framework resizable, if configured by the user this.makeResizable(); // Monitor textArea container becoming shown or hidden as it may change the height of the status bar @@ -2144,10 +2144,6 @@ this.addListener({ resize: { fn: this.onFrameworkResize - }, - beforedestroy: { - fn: this.onBeforeDestroy, - single: true } }); }, @@ -2308,8 +2304,9 @@ * Fire the editor when all components of the framework are rendered and ready */ onIframeReady: function () { - this.ready = this.toolbar.rendered && this.statusBar.rendered && this.textAreaContainer.rendered; + this.ready = this.rendered && this.toolbar.rendered && this.statusBar.rendered && this.textAreaContainer.rendered; if (this.ready) { + this.initEventListeners(); this.textAreaContainer.show(); if (!this.getEditor().config.showStatusBar) { this.statusBar.hide(); @@ -2353,7 +2350,7 @@ this.toolbar.destroy(); this.statusBar.destroy(); this.removeAll(true); - if (this.resizable) { + if (this.resizer) { this.resizer.destroy(); } return true; @@ -2552,7 +2549,7 @@ }, this); this.ready = true; this.fireEvent('editorready'); - HTMLArea._appendToLog('[HTMLArea.Editor::start]: Editor ready.'); + HTMLArea._appendToLog('[HTMLArea.Editor::onFrameworkReady]: Editor ready.'); }, /* * Set editor mode