Fix overlapping lines in attachment box with empty title

This commit is contained in:
Dan Stillman 2017-07-05 11:33:24 -04:00
parent 198bd70b59
commit 53c3f62f1e

View file

@ -201,8 +201,8 @@
}
var firstSpace = val.indexOf(" ");
// Crop long uninterrupted text
if ((firstSpace == -1 && val.length > 29 ) || firstSpace > 29) {
// Crop long uninterrupted text, and use value attribute for empty field
if ((firstSpace == -1 && val.length > 29 ) || firstSpace > 29 || val === "") {
title.setAttribute('crop', 'end');
title.setAttribute('value', val);
}