From 7c987d4cd1b118d0a056d66f88d0291b2ed96a93 Mon Sep 17 00:00:00 2001 From: Stanislas Rolland Date: Mon, 8 Dec 2014 13:42:59 -0500 Subject: [PATCH] [BUGFIX] RTE: insert table broken Opening any dialogue window raises a JS error. Releases: master Resolves: #63682 Change-Id: I5c1bee6785a350fc3328e930109653161139d918 Reviewed-on: http://review.typo3.org/35169 Reviewed-by: Stanislas Rolland Tested-by: Stanislas Rolland --- .../Public/JavaScript/HTMLArea/Plugin/Plugin.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js b/typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js index 5c24cf1ded08..28e824b08528 100644 --- a/typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js +++ b/typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js @@ -18,8 +18,9 @@ */ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin', ['TYPO3/CMS/Rtehtmlarea/HTMLArea/UserAgent/UserAgent', - 'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util'], - function (UserAgent, Util) { + 'TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util', + 'TYPO3/CMS/Rtehtmlarea/HTMLArea/Event/Event'], + function (UserAgent, Util, Event) { /** * Constructor method @@ -562,8 +563,9 @@ define('TYPO3/CMS/Rtehtmlarea/HTMLArea/Plugin/Plugin', * Show the dialogue window */ Plugin.prototype.show = function () { - // Close the window if the editor changes mode - this.dialog.mon(this.editor, 'HTMLAreaEventModeChange', this.close, this, {single: true }); + // Close the window if the editor changes mode + var self = this; + Event.one(this.editor, 'HTMLAreaEventModeChange', function (event) { self.close(); }); this.saveSelection(); if (typeof this.dialogueWindowDimensions !== 'undefined') { this.dialog.setPosition(this.dialogueWindowDimensions.positionFromLeft, this.dialogueWindowDimensions.positionFromTop); -- 2.20.1