Fixed insert order of attachment list
authorAlexander Ebert <ebert@woltlab.com>
Thu, 5 Jan 2017 12:26:53 +0000 (13:26 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 5 Jan 2017 12:54:57 +0000 (13:54 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Message/InlineEditor.js

index 966576ad9fa1e41202c66d832bf042a7c55ee473..780c2bfa870c39113174e7877bca060417f0b08c 100644 (file)
@@ -527,8 +527,10 @@ define(
                                //noinspection JSUnresolvedVariable
                                DomUtil.setInnerHtml(element, data.returnValues.attachmentList);
                                
+                               var node;
                                while (element.childNodes.length) {
-                                       elementData.messageFooter.appendChild(element.childNodes[0]);
+                                       node = element.childNodes[element.childNodes.length - 1];
+                                       elementData.messageFooter.insertBefore(node, elementData.messageFooter.firstChild);
                                }
                        }