[refactor] better modal heading string handling

This commit is contained in:
zombieFox 2020-06-14 17:02:45 +01:00
parent 07d8c864f4
commit 0278c352ce
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ var modal = (function() {
modalControls.appendChild(actionButton);
if (options.heading != null) {
if (options.heading.length > _maxHeadingLength) {
options.heading = options.heading.substring(0, _maxHeadingLength) + "...";
options.heading = options.heading.substring(0, _maxHeadingLength).replace(/\s+$/, "") + "...";
};
var modalHeading = helper.makeNode({
tag: "h1",