From c3502a4e1686209ef583cae92803ff877f627af0 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 21 Mar 2017 22:11:35 -0400 Subject: [PATCH] Only add the ellipses if the placeholder doesn't already end in one (closes #3920) --- modules/ui/fields/combo.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ui/fields/combo.js b/modules/ui/fields/combo.js index 2c2c75b60..49134a2eb 100644 --- a/modules/ui/fields/combo.js +++ b/modules/ui/fields/combo.js @@ -191,6 +191,7 @@ export function uiFieldCombo(field, context) { function setPlaceholder(d) { var ph; + if (isMulti || isSemi) { ph = field.placeholder() || t('inspector.add'); } else { @@ -199,8 +200,12 @@ export function uiFieldCombo(field, context) { ph = field.placeholder() || placeholders.slice(0, 3).join(', '); } + if (ph.match(/(…|\.\.\.)$/) === null) { + ph += '…'; + } + container.selectAll('input') - .attr('placeholder', ph + '…'); + .attr('placeholder', ph); }