Use sticky footer on edit template page

If you have a long template it’s annoying to have to scroll all the
way to the bottom to click save, when you’ve only changed a small thing
near the staert of the content.
This commit is contained in:
Chris Hill-Scott
2019-01-14 13:30:12 +00:00
parent 0ad4a06534
commit 509a9e861d
4 changed files with 29 additions and 15 deletions

View File

@@ -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 = () => $('<div/>').text(this.$textbox.val()).html();