[BUGFIX] Declare ``items`` for each RTE instance 65/47065/2
authorFlorian Busch <florian.busch@zweibusch.de>
Tue, 1 Mar 2016 13:04:59 +0000 (14:04 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 4 Mar 2016 15:57:49 +0000 (16:57 +0100)
The variable ``items`` was declared in a prototype instance and thus
shared between all RTE instances. Declare the variable in its own
instance instead.

Change-Id: Ia6f8b5dffb19121ed8995afcc2124b0084be5f7a
Resolves: #68392
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/47065
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Editor/Toolbar.js

index 43584f4..dd89773 100644 (file)
@@ -32,6 +32,11 @@ define(['TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util',
         */
        var Toolbar = function (config) {
                Util.apply(this, config);
+
+               /**
+                * The toolbar items
+                */
+               this.items = {};
        };
 
        Toolbar.prototype = {
@@ -77,11 +82,6 @@ define(['TYPO3/CMS/Rtehtmlarea/HTMLArea/Util/Util',
                },
 
                /**
-                * The toolbar items
-                */
-               items: {},
-
-               /**
                 * Create the toolbar items based on editor toolbar configuration
                 */
                addItems: function () {