[BUGFIX] RTE: insert table broken 69/35169/2
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 8 Dec 2014 18:42:59 +0000 (13:42 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Mon, 8 Dec 2014 18:45:23 +0000 (19:45 +0100)
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 <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Plugin/Plugin.js

index 5c24cf1..28e824b 100644 (file)
@@ -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);