diff --git a/contact_ajax.module b/contact_ajax.module
index 376989c..9cb2adf 100644
--- a/contact_ajax.module
+++ b/contact_ajax.module
@@ -17,6 +17,7 @@ use Drupal\Core\Ajax\HtmlCommand;
 use Drupal\Core\Ajax\ReplaceCommand;
 use Drupal\node\Entity\Node;
 use Drupal\Core\Render\Element\StatusMessages;
+use Drupal\views\Ajax\ScrollTopCommand;
 
 /**
  * Contact ajax form prefix
@@ -214,6 +215,9 @@ function contact_ajax_form_contact_message_form_alter(&$form, &$form_state, $for
           'wrapper' => $element_id,
           'effect' => 'fade',
       );
+      if (\Drupal::moduleHandler()->moduleExists('views')) {
+        $form['#attached']['library'][] = 'views/views.ajax';
+      }
     }
   }
 }
@@ -274,12 +278,18 @@ function contact_ajax_contact_site_form_ajax_callback($form, FormStateInterface
   $prefix = '#' . $element_id;
   $render_here = $contact_form->getThirdPartySetting('contact_ajax', 'render_selector', FALSE);
   $render_selector = $render_here ? $render_here : $prefix;
+  $output['#type'] = 'container';
+  $output['#attributes']['id'] = $render_selector;
   if ($render_selector != $prefix) {
     // if a custom selector is configured hide the form in its old position
     $response->addCommand(new ReplaceCommand($prefix, ''));
   }
   $response->addCommand(new HtmlCommand($render_selector, $output));
 
+  if (\Drupal::moduleHandler()->moduleExists('views')) {
+    $response->addCommand(new ScrollTopCommand($render_selector));
+  }
+
   return $response;
 }
 
