[refactor] better modal heading string handling
This commit is contained in:
parent
07d8c864f4
commit
0278c352ce
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue