Fixed inline editing
authorAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 14:57:21 +0000 (16:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 28 Jul 2016 14:57:26 +0000 (16:57 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js

index edbbfba01bfd84e4072ad8b0f42f2ccc2d23f4ae..4258efa481b33cb523ec67152cfe8f9c91a41d69 100644 (file)
@@ -488,8 +488,9 @@ define(
                 * @protected
                 */
                _showMessage: function(data) {
-                       var elementData = this._elements.get(this._activeElement);
-                       var attachmentLists = elBySelAll('.attachmentThumbnailList, .attachmentFileList', elementData.messageBody);
+                       var activeElement = this._activeElement;
+                       var elementData = this._elements.get(activeElement);
+                       var attachmentLists = elBySelAll('.attachmentThumbnailList, .attachmentFileList', elementData.messageFooter);
                        
                        // set new content
                        //noinspection JSUnresolvedVariable
@@ -507,7 +508,7 @@ define(
                                DomUtil.setInnerHtml(element, data.returnValues.attachmentList);
                                
                                while (element.childNodes.length) {
-                                       elementData.messageBody.appendChild(element.childNodes[0]);
+                                       elementData.messageFooter.appendChild(element.childNodes[0]);
                                }
                        }
                        
@@ -531,7 +532,7 @@ define(
                        
                        this._restoreMessage();
                        
-                       this._updateHistory(this._getHash(this._getObjectId(this._activeElement)));
+                       this._updateHistory(this._getHash(this._getObjectId(activeElement)));
                        
                        UiNotification.show();