diff --git a/app/assets/javascripts/highlightTags.js b/app/assets/javascripts/highlightTags.js
index 896c83358..bc533d4b7 100644
--- a/app/assets/javascripts/highlightTags.js
+++ b/app/assets/javascripts/highlightTags.js
@@ -32,12 +32,20 @@
};
- this.resize = () => this.$textbox.height(
- Math.max(
- this.initialHeight,
- this.$background.outerHeight()
- )
- );
+ this.resize = () => {
+
+ this.$textbox.height(
+ Math.max(
+ this.initialHeight,
+ this.$background.outerHeight()
+ )
+ );
+
+ if ('stickAtBottomWhenScrolling' in GOVUK) {
+ GOVUK.stickAtBottomWhenScrolling.recalculate();
+ }
+
+ };
this.escapedMessage = () => $('
').text(this.$textbox.val()).html();
diff --git a/app/templates/components/page-footer.html b/app/templates/components/page-footer.html
index 31c1e94e3..3e24a5cd4 100644
--- a/app/templates/components/page-footer.html
+++ b/app/templates/components/page-footer.html
@@ -35,3 +35,9 @@
{% endif %}
{% endmacro %}
+
+{% macro sticky_page_footer(button_text=None) %}
+
+ {{ page_footer(button_text) }}
+
+{% endmacro %}
diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html
index 695983d40..b0ceb4b26 100644
--- a/app/templates/views/edit-email-template.html
+++ b/app/templates/views/edit-email-template.html
@@ -1,6 +1,6 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
-{% from "components/page-footer.html" import page_footer %}
+{% from "components/page-footer.html" import sticky_page_footer %}
{% from "components/radios.html" import radios %}
{% from "components/form.html" import form_wrapper %}
@@ -23,7 +23,7 @@
{% if current_user.platform_admin %}
{{ radios(form.process_type) }}
{% endif %}
- {{ page_footer(
+ {{ sticky_page_footer(
'Save'
) }}
diff --git a/app/templates/views/edit-letter-template.html b/app/templates/views/edit-letter-template.html
index 353ae4721..6884c67a7 100644
--- a/app/templates/views/edit-letter-template.html
+++ b/app/templates/views/edit-letter-template.html
@@ -1,6 +1,6 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
-{% from "components/page-footer.html" import page_footer %}
+{% from "components/page-footer.html" import sticky_page_footer %}
{% from "components/radios.html" import radios %}
{% from "components/form.html" import form_wrapper %}
@@ -23,7 +23,7 @@
{% endif %}
{{ textbox(form.subject, width='1-1', highlight_tags=True, rows=2) }}
{{ textbox(form.template_content, highlight_tags=True, width='1-1', rows=8) }}
- {{ page_footer(
+ {{ sticky_page_footer(
'Save'
) }}
diff --git a/app/templates/views/edit-sms-template.html b/app/templates/views/edit-sms-template.html
index 2b56c4852..0acdd046c 100644
--- a/app/templates/views/edit-sms-template.html
+++ b/app/templates/views/edit-sms-template.html
@@ -1,6 +1,6 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
-{% from "components/page-footer.html" import page_footer %}
+{% from "components/page-footer.html" import sticky_page_footer %}
{% from "components/radios.html" import radios %}
{% from "components/form.html" import form_wrapper %}
@@ -24,7 +24,7 @@
{% if current_user.platform_admin %}
{{ radios(form.process_type) }}
{% endif %}
- {{ page_footer(
+ {{ sticky_page_footer(
'Save'
) }}