diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index debc2d3..a2ee85e 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -641,8 +641,11 @@ function template_preprocess_comment(&$variables) {
   }
 
   if (isset($comment->in_preview)) {
-    $variables['title'] = \Drupal::l($comment->getSubject(), new Url('<front>'));
-    $variables['permalink'] = \Drupal::l(t('Permalink'), new Url('<front>'));
+    // Link title and permalink to current page because comment could not be
+    // saved now and we should not allow user to leave the page.
+    $uri = new Url('<current>', array(), array('fragment' => 'new'));
+    $variables['title'] = \Drupal::l($comment->getSubject(), $uri);
+    $variables['permalink'] = \Drupal::l(t('Permalink'), $uri);
   }
   else {
     $uri = $comment->urlInfo();
diff --git a/core/modules/comment/src/Tests/CommentPreviewTest.php b/core/modules/comment/src/Tests/CommentPreviewTest.php
index 75aca4d..9355a61 100644
--- a/core/modules/comment/src/Tests/CommentPreviewTest.php
+++ b/core/modules/comment/src/Tests/CommentPreviewTest.php
@@ -62,6 +62,9 @@ function testCommentPreview() {
 
     // Check that the user picture is displayed.
     $this->assertFieldByXPath("//article[contains(@class, 'preview')]//div[contains(@class, 'user-picture')]//img", NULL, 'User picture displayed.');
+
+    // Check that the permalink and subject link has #new fragment
+    $this->assertLinkByHref('comment#new');
   }
 
   /**
