mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Only add the ellipses if the placeholder doesn't already end in one
(closes #3920)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user