From af28b332148087c83501bf37a376c73b5fd357cb Mon Sep 17 00:00:00 2001 From: Stefan Parviainen Date: Sun, 21 Dec 2014 14:36:46 +0100 Subject: Fix whitespace disappearing at the beginning of completed smily --- view/js/autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/js') diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 7e6fc44ab..e62959a6c 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -52,7 +52,7 @@ function replace(item) { index: 2, search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry['text'].indexOf(term) === 0 ? entry : null })) }) }, template: function(item) { return item['icon'] + item['text'] }, - replace: function(item) { return item['text'] + ' '; }, + replace: function(item) { return "$1"+item['text'] + ' '; }, } this.textcomplete([contacts,smilies],{}); }; -- cgit v1.2.3