Revert comment input on success
authorAlexander Ebert <ebert@woltlab.com>
Thu, 9 Mar 2017 13:22:06 +0000 (14:22 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 9 Mar 2017 13:22:06 +0000 (14:22 +0100)
See #2233

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Comment/Add.js

index e3e899c1015754a05238a3ec59edb94e673b3644..e7697cea82fcb6e3ae584388386b5f3c8d0bbe79 100644 (file)
@@ -213,6 +213,12 @@ define(['Ajax', 'Core', 'EventHandler', 'Language', 'Dom/ChangeListener', 'Dom/U
                        this._getEditor().code.set('<p>\u200b</p>');
                        
                        EventHandler.fire('com.woltlab.wcf.redactor2', 'reset_text');
+                       
+                       if (document.activeElement) {
+                               document.activeElement.blur();
+                       }
+                       
+                       this._content.classList.add('collapsed');
                },
                
                /**