From 6e95a922368ea824f48196a144bb14ea6936d410 Mon Sep 17 00:00:00 2001 From: Andy Strobel Date: Wed, 23 Jul 2014 19:43:43 +0200 Subject: [PATCH] Fixed comment form enter event --- protected/modules_core/comment/widgets/views/form.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/protected/modules_core/comment/widgets/views/form.php b/protected/modules_core/comment/widgets/views/form.php index 58fea949bc..a3a3d91a70 100644 --- a/protected/modules_core/comment/widgets/views/form.php +++ b/protected/modules_core/comment/widgets/views/form.php @@ -25,13 +25,12 @@ $('#comments_area_" . $id . "').html(html); $('#newCommentForm_" . $id . "').val('').trigger('autosize.resize'); - $.fn.mention.reset('#newCommentForm_" . $id . "'); }", ), array( 'id' => "comment_create_post_" . $id, 'class' => 'btn btn-small btn-primary', - 'style' => 'position: absolute; top: -3000px; left: -3000px;', + 'style' => 'display: none;', ) ); ?> @@ -48,11 +47,11 @@ event.cancelBubble = true; event.returnValue = false; + event.preventDefault(); $('#comment_create_post_').focus(); $('#comment_create_post_').click(); - } return event.returnValue;