Work-around Grammarly messing up the DOM
authorAlexander Ebert <ebert@woltlab.com>
Mon, 5 Dec 2016 10:16:45 +0000 (11:16 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 5 Dec 2016 10:16:51 +0000 (11:16 +0100)
wcfsetup/install/files/js/WCF.Comment.js

index ad1a6c0f4c5d727a4ff1ff967b88362708ce2138..16b8c46e72b0358da639e3ce57db59e298d60dbd 100644 (file)
@@ -829,8 +829,8 @@ WCF.Comment.Handler = Class.extend({
        _saveEdit: function(event) {
                var $input = $(event.currentTarget);
                if ($input.is('button')) {
-                       $input.prev('small.innerError').remove();
-                       $input = $input.prev('textarea');
+                       $input.parent().children('small.innerError').remove();
+                       $input = $input.parent().children('textarea');
                }
                var $message = $.trim($input.val());