Fixed an issue with the reply button on last page
authorAlexander Ebert <ebert@woltlab.com>
Mon, 29 Aug 2016 07:28:55 +0000 (09:28 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 29 Aug 2016 07:28:55 +0000 (09:28 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabReply.js

index 818a2fca49dcf3ffaf397f0bcd095b57b50f77bd..7ff166e9cf267e3606e498ae74f2c249cdca2dc9 100644 (file)
@@ -24,7 +24,12 @@ $.Redactor.prototype.WoltLabReply = function() {
                },
                
                showEditor: function () {
-                       if (!_messageQuickReply.classList.contains('messageQuickReplyCollapsed')) {
+                       if (!_messageQuickReply) {
+                               // direct api call, but conditions are not met, be graceful
+                               this.WoltLabCaret.endOfEditor();
+                               return;
+                       }
+                       else if (!_messageQuickReply.classList.contains('messageQuickReplyCollapsed')) {
                                return;
                        }